Panda Guru LogoPanda
Guru

Uber | SDE 2 | Bangalore | Sep 2024 [Reject]

Round 1: Online Assessment

Questions:

  1. Given an array, find sum such that if
    If a[i] < a[i+1] then add 1
    If a[i] > a[i+1] then add 2

  2. Given String1 = panel and set of strings namely codes, for each index1 i in code in codes, check if the string to the right of index1 matches the string at index2 of panel formed by taking digits to the left of index1 in code (Implementation heavy string matching) (Took me the most time: 17 mins)

  3. Rotten Oranges

  4. Given an array of 0’s and 1’s only and below 2 operations as m queries, return resultant array after performing all operations
    L: switch 0 at smallest index to 1 if any
    C{index}: change value at index to 0

Scored 600/600. Verdict: Passed.

Candidate's Approach

No approach provided.

Interviewer's Feedback

No feedback provided.


Round 2: Business Phone Screen

Questions: Given a sorted array with positive and negative values, sort them based on the square of its values. Also, print the squared values array.

Follow Up: Now, given the same array, how would you modify your code to find the kth smallest square element in the array. Expected O(LogN)
The problem can be reduced to finding the kth smallest element in union of two sorted arrays similar to median of two sorted arrays

Was not able to provide an O(LogN) working solution for the 2nd question. Interviewer gave no hints.

Verdict: Rejected. Received same day outcome

Candidate's Approach

No approach provided.

Interviewer's Feedback

No feedback provided.