Uber | OA | SDE2
Anonymous User
3894

There were total 4 questions and the time limit was 70 minutes.

Q1: Given array a[], b[], c[] and signs[], need to return a boolean array based on condition a[i] signs[i] b[i] = c[i]

Q2: Given a sentence, need to calculate the absolute difference of vowels and consonants for each word and return a list of strings sorted in the context of whose difference is the lowest. If two words have same difference, return the lexicographically smaller one first.

Q3: Flatten the matrix by spiral iteration and output the sum of elements whose index is divisible by 3.

Q4: There is an infinite number line and Q queries. One query type is BUILD X which builds an obstacle on point X. Another query type is CHECK Y N which checks if we can build N obstacles before point Y. Need to return the answer for all the CHECK query type.

Comments (11)