Years of experience - 4
Profile - SDE2
First Round :
There were 2 codility questions to be completed within 90 minutes.
i) A set S contains numbers of the form 2^P*3^Q, where P and Q are non-negative integers. Sequence A contains the elements of set S in ascending order. The first few elements of A are :
A[0] = 1
A[1] = 2
A[3] = 3
A[4] = 4
A[5] = 6
A[6] = 8
A[7] = 9
A[8] = 12 and so on.
Write a function to return the value of A[N]. For e.g. if N = 4, The function should return 6.
ii) To find the error in code an fix it.
Second Round :
i) Behavioral questions including intro, projects, technologies etc.
ii) https://leetcode.com/problems/odd-even-linked-list/
iii) Ask questions if you have any.
Third Round :
i) Intro.
ii) Get the stcok price of companies on basis of passed symbols (AMZN, MSFT, FCBK etc) and tell the last N queried symbols.
Constaints -
T0 -> AMZN
T1 -> AMZN
T2 -> MSFT
If N = 2, then return MSFT and AMZN and if N = 3, then return MSFT and AMZN (duplicate is not allowed).
Millions of queries have been done, return last 10K queried symbols.
Challenges - Storing Query symbols, Quering, Duplicate handling etc.
iii) Cut a binary tree into 2 equal half. If there are odd number of nodes in the tree then cut in such a way that the difference between number of nodes in the trees are minimized.
iv) Questions for him if any.
Fourth Round :
i) Intro
ii) Low level design and implement cache which expires with time.
iii) Questions for him if any.