Message on Whatsapp 8879355057 for DSA(OA + Interview) + Fullstack Dev Training + 1-1 Personalized Mentoring to get 10+LPA Job
0 like 0 dislike
in Interview-Experiences by Expert (30,360 points) | 784 views

1 Answer

0 like 0 dislike

Education: B Tech in Computer Science (Tier 3 college)
Years of Experience: 4
Prior Experience: Flipkart (SDE II)
Previous TC : 27 LPA


I got referral from my friend working in Uber. Then recruiter reached out to me discuss about my availability. I scheduled all round after 1 weeks of getting the call as I was already preparing for switch since last two months.


Round 0 (Screening) :
Given an array of points on the X-Y plane and an integer k, return the k closest points to the origin.


Quickly gave answer with priority queue but he was interested in more optimised solution. I was aware of quick select approach but was not confident about giving working code. As they run your code on codesignal link. I was able to provide the working code in last few minutes.


Round 1 (Coding) [1.5 hour]:


Note: In this round Uber is more focused on OOPs concept and concurrency aspect of the question.
Design an inmemory pull based queue library where multiple publishers and consumers can publish/read the messages from the shared queue. And each message can have optional TTL .


Expectation : Clean, working code.
This was the worst round I have had. I was looking for the executor service syntax online. Had difficulty in maintaining the offset for each consumer but eventually able to provide the working code. Multiple hints was given by the interviewer while coding itself regarding TTL and offset management.
Most important thing in this round I guess is to show the working code.


Round 2 (Problem Solving) [1 hour]:


There is an exam room with n seats in a single row labeled from 0 to n - 1.


When a student enters the room, they must sit in the seat that maximizes the distance to the closest person. If there are multiple such seats, they sit in the seat with the lowest number. If no one is in the room, then the student sits at seat number 0.


Design a class that simulates the mentioned exam room.


Implement the ExamRoom class:


ExamRoom(int n) Initializes the object of the exam room with the number of the seats n.
int seat() Returns the label of the seat at which the next student will set.
void leave(int p) Indicates that the student sitting at seat p will leave the room. It is guaranteed that there will be a student sitting at seat p.


Question :


I encountered this problem for the first time during interview. Initially interviewer asked to implement only seat() method which I was able to provide the solution in 2-3 minute using priority queue O(LogN). But when he asked to implement leave() method it was very inconvinient to use priority_queue for me. So I removed seat code itself and gave solution using set which was having complexity O(n) for seat and O(logN) for leave() method. I ran the code it was working fine. We still left with the 20-25 minutes in the interview , he asked me to optimise seat() complexity. I then used set<pair<int, int>> to maintain all interval in sorted order and two vector left and right to maintain recent left and right position of any index. I was able to ran the happy case. I already told him this code will require intense testing as we might not be covering edge cases like if last position becomes vacant and then we call seat().


Round 3 (Design) [1 hour]:


Design the multiplayer online chess game.
It is very standard design question.
Interviewer went in depth of databases choice and storage technique for list of moves and undo operations.


Round 4 (Bar Raiser) [1 hour]:


Mostly resume discussions.
Did you solve any scaling challenges in your project?
Most challeging project you have ever work on. About design discussions with seniors. Any project where requiements was so vague and how did you deal with it.
Your in depth knowledge of your work is checked.


Round 5 (Hiring Manager) [1 hour]:


Resume discussion similar to bar raiser. Again asked to explain the most challenging project in depth.
Behavioural questions like : Comments have you received in code reviews or comments I gave to other developers while reviewing, conflict with your manager/senior and how did you handle it.
Db and api discussion for my project. Asked me if I could have done better there or not.


Overall Feedback: Positive (I think I could have done better in machine coding round, if I had brush up the concurrency concept before interview)


For more interview experiences check the below link

by Expert (30,360 points)

Get best answers to any doubt/query/question related to programming , jobs, gate, internships and tech-companies. Feel free to ask a question and you will receive the best advice/suggestion related to anything you ask about software-engineering , development and programming problems .