Round 0
Online Assesment Test - Code Signal - 1 Easy Leetcode Question, 2 Medium Leetcode Questions. I had scored 100 Percent in this test, as appeared at finish page.
All interview rounds were 1 hour long
Round 1
First Question - Merge two sorted arrays.
Second Question - Write your own implementation of any data structure of your choice - Since I was familiar with internal workings of HashMap, I suggested to write an implementation of HashMap in Java. Interviewer also wrote a problem statement quickly as below
// Design HashMap without using built-in hash table/hash set data structures/functions
class MyHashMap {
void put(int key, int value) {
// implement me
}
int get(int key) {
// implement me
}
void remove(int key) {
// implement me
}
}I implemented using List of LinkedList . Index in List was taken based on a hash function.
Interviewer seemed very happy at the end that I implemented my own hashmap .
Round 2
Right after previous round this round was scheduled.
First Question - Multiple numbers which are in string.
a = "2387627362873627368273682736287"
b = "232323323232325454666"
(String )result = a * bSecond Question - Find the maximum path sum between two leaves of a binary tree
I had some issues in first problem because multipliers of 10 were not correct in my code and it was failing for some test cases.
After a week 2 more back to back rounds were scheduled.
Round 3
Design Distributed Key Value Data Store.
It was a long and tiring discussion, for every solution I suggested, he had a counter problem. Discussion over CAP theorem , discussions related to eventual consistency ,
At one sub problem he mentioned, I suggested this design -> taking hash of keys and directing hash values in a particular range to a particular server.
This round didn't seem to go well for me.
Round - 4
With Engineering manager .
Problem one- Given an array. Find the number of ways in which array can be divided into 3 subarrays such that sum across al 3 subarrays is same. You can not rearrange array. Subarrays will be consecutive.
I had to write the code in codility. Where test cases were also available.
I wrote a O(n) solution but few test cases were failing, sometimes 8/12 passed ,sometimes 10/12.
There were some issues in my code and took me much time .
Later he started asking me how we do deployments and other work related things.
I was expecting an offer at this time, but after a week one more interview round was scheduled with Development Manager
Round 5
Questions about Projects - How and where you are using Kafka. Since you have worked on Scala, list down few things you like about Scala. Which one do you like more - Java or Scala and Why ? I told Java.
Then two coding questions -
First Problem -> Stock Buy Problem for list of Prices. Sell And Buy only allowed once.
Second Problem -> One DP Problem -> If we do encoding like this - ‘A’ the code word for 1, ‘B’ will be 2, and so on down to ‘Z’ being assigned 26. Given an integer, return all possible encoding for this integer.
After that when 15 minutes left he went on discussing high level design of a Movie Seat Serving System. Where focus was on flow from payment to seat confirmation.
How will you handle a case where two users are trying to book the same seat at the same time. Questions from DB Level Locking.
Next day I again had a meeting with Development Manager and offer discussion happened.
Offer Details - https://leetcode.com/discuss/compensation/1633100/Agoda-or-Software-Engineer-or-Bangkok-Thailand