Quora | SWE-ML intern | Mountain View |OA
Anonymous User
1194

Recieved OA: 20 Dec 2019 (Automated)

Deadline to complete test 3rd Jan(14 days)
Platform: Codility

The test has 4 question which needs to be solved in 70min
each question has 300 points

  1. Given an array A, for A[i-1] A[i] and A[i+1], if exactly 2 of the 3 integers is same, then its considered a good tuple. Count number of good tuples present.

  2. Given two strings S and T consisting of digits and lowercase letters, you are allowed to remove only digit from either string, count how many ways of removal to make S lexicographically smaller than T.
    If s = '3ab' and t = 'cd', return 1. If s = '123ab' and t = '423cd', return 6.
    https://stackoverflow.com/questions/57648760/given-2-strings-remove-only-one-digit-to-make-1-string-lexicographically-smalle

  3. Given a square 2d matrix M and a number K, Rotate all elements 90 deg clockwise K times keeping the elements on the diagonals intact. return the matrix.

  4. Matrix querying: given an NxM integer matrix such that Matrix[i][j] = (i+1)(j+1), perform 2 operations:
    a. if query is [0], return the minimum element in the matrix.
    b if query is [x,y] : x = 1 implies rows and x=2 implies columns, y implies which row/column needs to be deactivated and not considered for min element.
    return the list of min values for the min val queries.

Got a score of 836/850. Solved all the questions receiving 300 each in all. Passed the OA and they scheduled an interview in mid Jan. But they can cancelled the interview as all the positions got filled :(

Comments (1)