Panda Guru LogoPanda
Guru

Uber Hiring Drive

Round 1

Questions:

Question

Given an array of sorted integers, sort the array in ascending order of squares of its elements.

For example:

[1, 5, 7, 7, 8, 10] -> [1, 5, 7, 7, 8, 10] [-5, -3, -3, 2, 4, 4, 8] -> [2, -3, -3, 4, 4, -5, 8]

i.e., squares : [4, 9, 9, 16, 16, 25, 64]

Follow-up Question

Candidate's Approach

No approach provided.

Interviewer's Feedback

No feedback provided.


Round 2

Questions:

Question

Given a series of text, write some code to find the top k terms in that text.

Text: b a b a a c
k: 2

Result: ["a", "b"] since a occurs 3 times, b 2 times.

Follow-up Question

Candidate's Approach

No approach provided.

Interviewer's Feedback

No feedback provided.