Tip 1: Do some basic research about the interview process and types of rounds before appearing for a company interview. Narrow down the topics and draft a realistic plan afterward.
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 taken 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 a number of arrays and breaking the outer loop if the number of odds exceed 'k'.
The optimized solution is to take two pointer approach where the right pointer is incremented till num of odds does not exceed 'k'. If the limit is reached, increment the left pointer and add a 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 a publisher-subscriber-based messaging queue supporting the following features:
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.
Design Stock Exchange System:
I was required to describe a typical stock exchange system design. He asked me to begin by defining API contracts. The problem was open-ended, so I started by clarifying the scope and performing basic scale calculations. Only then did I begin defining the API contract.
We had a discussion on the data structures to be used to support the core logic and then moved on to defining the database schema. Finally, we had a 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 within time constraints. Try to discuss approaches with friends.
Tip 3: Clarify as many doubts and assumptions as possible with 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 behavioral and situational questions for the role.
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
Which SQL keyword removes duplicate records from a result set?