注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
1. Given an int array of length n, return a result array of length n-2,
where result[i] = 1 if
array[i]^2 + array[i+1]^2 = array[i+2]^2,
array[i+1]^2+arra[i+2]^2 = array[i]^2 and
array[i]^2 + array[i+2]^2 = array[i+1]^2, otherwise result[i] = 0
2.
Given a string and a list of valid letters, count how many words in the string can be formed using the letters in the valid letters list.
For the input string, words are split using spaces.
Puncutation and numbers are always considered valid letters
Both uppercase and lowercase is invalid for letters not present in the input list.
ex: "Hello, I am h2ere!" Letters: "heloiar" Output: 3, Valid words: "Hello," , "I&x where matrix[i][j] = i*j (1 based index).
For ex: n = 2, m = 2, Matrix =
[1(1x1) 2(1x2)
2(2x1) 4(2x2)]
Given input actions of format (i,j)
Type 1: Return min of matrix values, ex: (0,0) second value is irrelevant, return min of all elements
Type 2: Remove row i from the matrix, ex (1, 2) delete 2nd row
Type 3: Remove col i from the matrix, ex (2, 1) delete 1st col
|