Tip 1 : Do some basic research about the interview process and types of rounds while appearing for a company interview. Narrow down the topics and draft a realistic plan afterwards.
Tip 2 : Try to solve as many problems as possible as this is primarily what you will be doing in live interview rounds.
Tip 1 : Tailor your resume as per expectations from the role you are applying for.
Tip 2 : Order your experiences and skills by relevance.
Tip 3 : Try to fit the content in a single page.
Timing: evening
Environment: Online round took at home
If more than one such contiguous subarrays exist, consider the subarray having the smallest leftmost index.
For example - if A is [1, 2, 2, 3, 1, 3 ] and k = 2 then the subarrays: [1,2], [2,3], [3,1], [1,3] are the smallest subarrays containing 2 distinct elements. In this case, we will consider the starting and ending index of subarray [1,2] i.e. 0 and 1.
At first sight this can be solved easily by using two loops to iterate over contiguous subarrays in O(n^2) and counting number of arrays and breaking the outer loop if number of odds exceed 'k'.
Optimised solution is to take two pointer approach where right pointer is incremented till num of odds not exceed 'k'. If limit is reached, increment left pointer and add number of arrays (right - left+1)*(right-left)/2 to the result. This solves the problem in O(N)
Machine coding round
Design and code publisher subscriber based messaging queue supporting following features:
1. New topic creation
2. Multiple consumer subscriptions to a topic
3. Multiple producer threads writing to a topic
4. Topic message rewind (maintain commit logs)
1. I drafted LLD by defining classes - methods and members.
2. I discussed the approach and working of LLD to fit the given features
3. I live coded the classes and logic using core Java on my machine.
Practise many grid problems
I was required to describe a typical stock exchange system design.
He asked me to begin with defining API contracts. Problem was open ended. Started with clarifying the scope and did basic scale calculations. Only then begin with defining API contract.
Had a discussion on data structures to be used to support core logic. Then jumped to defining database schema.
Finally had some high level design discussion on scaling the system and database partition rebalance strategies.
Tip 1 : Revise general distributed system concepts thoroughly.
Tip 2 : Practice as many design problems as possible with time constraints. Try to discuss approaches with friends.
Tip 3 : Clarify as many doubts and assumptions as possible wit h the interviewer before jumping to the solution.
Hiring Manager round
1. Brief description of past work.
2. Recent challenging bug/issue solved.
3. Design description of one of the projects.
4. SDLC, tooling, agile related discussions.
Tip 1 : Revisit and recollect your past experiences in detail with a focus on learnings, challenges, conflicts etc.
Tip 2 : Prepare general behavioural and situational questions for the role.
TikTok uses _________ to recursively display trending videos ensuring your feed is filled with new content.