Uber | SSE | Hyderabad | September 2023

Anonymous User
2482
Oct 06, 2023
Oct 09, 2023

YoE: 7+
Role: Senior Software Engineer

Round 1: DSA and Machine Coding Round 1(hr)

  • Design Meeting Scheduler.
  • Contraints:
    • There are multiple meeting rooms
    • Meeting room can be allocated at any time in a day. There is no contraint on the time.
    • Meeting room can be occupied for any time duration. Example for 30 mins or may be for 2 hours as well.
    • Proper error message should be given incase meeting room can't be booked for given time slots.
  • Objective was to have a fully running/working code at the end of the interview which satisfied all the above constraints.
  • It was a kind of machine coding round where I designed multiple modules and provide class interactions to creating meetings. I was also code logic to to add/delete multiple meeting rooms.
  • Once I complete the code, interviewer took the access and tried multiple test cases and aksed me to fix the failed scenarios. First failed test case was quite easy but another test case would require the complete algorithm change. I explained the new algo to interviewer verbally since we were running out the time.
  • Round was stretched upto 1.5 hour.

Round 2: DSA

  • During a day, there are millions of transactions happening between banks. Because there are so many transactions, those are sorted only at the end of each day, when the balances between each bank are calculated. This is called “settlement”. The process of calculating the end of day balances between banks, and moving the money from one to another. Because this process is so complex, banks work with “clearing houses”. Those are third party financial institutions to which banks send all their transactions and that processes the “settlement” for them. We want to build the software for a clearing house. Write down APIs which are exposed in the service. How to store data in DB. Time and Space complexity for the algorithm.
  • Example: Transactions = [
    {"payee"= "BoA", amount= 132, payer= "Chase"},
    {"payee"= "BoA", amount= 827, payer= "Chase"},
    {"payee"= "Wells Fargo", amount= 751, payer= "BoA"},
    {"payee"= "BoA", amount= 872, payer= "Wells Fargo"}]
  • The result should be the final mapping between banks and the amount which needs to be settled between them.
  • Example: Result = {
    ('BoA', 'Wells Fargo')= -121.0, OR ('Wells Fargo', 'BoA')= 121.0
    ('BoA', 'Chase')= 959.0 }
  • The objective was to come up with multiple API methods, data struture that can store the input transcations and return the final settlement at any moment of the time.
  • I came up with multiple API's where settlement can view and write the compete code for them.
    • Between two given banks. Example: GetSettlement(bank1, bank2);
    • All settlement for given bank. Example: GetAllBankSettlement(bank1);
    • All settlement for all banks. Example: GetSettlement();

Time for 2 rounds: Both interviews scheduled on different days.
Note: They wanted to continue my rounds for SDE2 role but currently there are no openings so did not conduct the rest of the interviews.

Comments (3)