Uber| OA|SDE2
Anonymous User
1579
  1. Iterate through array 'a' and return another array b of length a.length -2, where b[i] = 1 if a[i-1]<a[i]>a[i+1] or a[i-1]>a[i]<a[i+1].
  2. given an array element. Find if 1 or more cyclic rotation of a will lead to identity matrix or reverse identity matrix; return true if so
  3. 2-D matrix is given with ".","","#" as input
    "." - empty "
    " small boxes "#"obstacles
    if we rotate the matrix clockwise, show how the boxes will fall down due to gravity, keeping in mind obstacles on that path.
  4. given [[]] array with two types of input [0,int a, int b] or [1,int a, int b] where a and b represent rect sides. if [0,int a, int b] - add and store a rectangle of given size
    [1,int a, int b] - check if new rectangle can fit all the rectangles before it. return a list of true/false, based on given condition.

I could do 2 and ran out of time before the other two. It will be good to see how you all would answer these questions.

Comments (2)