Tip 1: Be consistent with DSA practice and focus on writing optimized solutions with attention to time complexity. Solving Striver’s sheet on coding platforms will expose you to quality problems and improve problem-solving skills.
Tip 2: Revise fundamentals like OOP, Operating Systems, Machine Learning (Python), and System Design basics, as they are frequently asked in interviews and help build confidence.
Tip 3: Build strong projects for your resume, participate in hackathons, and take part in regular contests.
Tip 1: Keep your resume concise (one page) and highlight only the most relevant experiences.
Tip 2: Include 2–3 impactful projects from different tech stacks (e.g., MERN, ML, AI) and clearly showcase the skills and technologies used.
Tip 3: Mention achievements, hackathons, and coding contests to demonstrate problem-solving ability and initiative.
The OA had a flexible 4-hour login window on Sunday, which made it convenient to attempt from home in a comfortable environment. About a week after receiving confirmation that I was shortlisted, my interviews were scheduled.



For the given binary tree: [1, 2, 3, -1, -1, 4, 5, -1, -1, -1, -1]
Start Node: 3
1
/ \
2 3
/ \
4 5
Output: 2
Explanation :
In the zeroth minute, Node 3 will start to burn.
After one minute, Nodes (1, 4, 5) that are adjacent to 3 will burn completely.
After two minutes, the only remaining Node 2 will be burnt and there will be no nodes remaining in the binary tree.
So, the whole tree will burn in 2 minutes.
Traverse tree using DFS (post-order).
If node is nullptr, return 0.
Recurse left and right to get depths.
If current node == start:
Set maxDistance = max(leftDepth, rightDepth)
Return -1 (marks infection start).
If start not in subtrees (both depths ≥ 0):
Return max(leftDepth, rightDepth) + 1.
If start in one subtree (one depth < 0):
Compute distance = abs(leftDepth) + abs(rightDepth).
Update maxDistance = max(maxDistance, distance).
Return min(leftDepth, rightDepth) - 1.
After traversal, maxDistance is the infection spread time.

Use a counter that increments when seeing R and decrements when seeing L.
Finally, use modulo on the counter to determine the direction.
If the count is negative, the direction will be different. Check the code for handling negative values as well.
My first interview was conducted by a senior manager and began with a brief self-introduction, after which I was given two DSA problems to solve. One problem was based on a greedy approach, while the other involved dynamic programming. I was able to explain my thought process clearly and provide optimized solutions to both problems. The environment was professional and supportive, with standard questions that aligned well with common practice material. Overall, it was a smooth experience, and I felt confident about my performance in this round.



Given students' ratings : [5, 8, 1, 5, 9, 4].
He gives the students candy in the following minimal amounts : [1, 2, 1, 2, 3, 1]. He must buy a minimum of 10 candies.
1. If two students having the same grade are standing next to each other, they may receive the same number of candies.
2. Every student must get at least a candy.
Initialize: Create an array candies of size n, fill with 1 (everyone gets at least one).
Left → Right pass:
For i from 1 to n-1, if ratings[i] > ratings[i-1], set
candies[i] = candies[i-1] + 1.
(This satisfies the constraint w.r.t. the left neighbor.)
Right → Left pass:
For i from n-2 down to 0, if ratings[i] > ratings[i+1], set
candies[i] = max(candies[i], candies[i+1] + 1).
(This fixes the constraint w.r.t. the right neighbor without breaking the left.)
Sum up all values in candies — that’s the minimum total.



For Amount = 70, the minimum number of coins required is 2 i.e an Rs. 50 coin and a Rs. 20 coin.
It is always possible to find the minimum number of coins for the given amount. So, the answer will always exist.
Inputs: coins (int[]), amount (int).
Sentinel: Let INF = amount + 1 (a value > any possible answer).
DP Array: Create dp[0..amount], fill with INF.
Base: dp[0] = 0 (0 coins to make sum 0).
Transition: For each coin c in coins
  For x from c to amount:
  dp[x] = min(dp[x], dp[x - c] + 1)
(reuse same coin → unbounded).
Answer: If dp[amount] == INF, return -1; else return dp[amount].
In my second round, the interviewer began with a brief introduction, during which I talked about my background, interests, and projects. The first technical question was a DSA problem on finding the median in a given range using a priority queue. This question took some time to solve, but I explained my thought process clearly while working through it. After that, as time was running short, the interviewer moved on to OOPs concepts, asking about the basics, such as principles, writing simple structures, and how they are implemented in C++. Overall, this round was more challenging than the first, but it tested both my problem-solving skills and OOPs fundamentals.

Step 1: I initially considered a brute-force approach: for every query [L, R], extract the subarray, sort it, and then find the median. This solution works but takes O(N log N) per query, which becomes inefficient for large inputs.
Step 2: The interviewer asked me to optimize, but at that moment, I was unable to recall the standard optimization technique using two heaps (priority queues).
Step 3 (Later Realization): The efficient method is to use two heaps – a max-heap for the left half of the elements and a min-heap for the right half. For each query, elements of the subarray [L, R] can be inserted into these heaps, balancing their sizes. The median is then either the top of one heap (for odd-length subarrays) or the average of both tops (for even-length subarrays).
Tip 1: Always start with the four pillars of OOP – Encapsulation, Abstraction, Inheritance, Polymorphism. Provide both definitions and real-world examples (e.g., Car = Abstraction, Engine = Encapsulation, Sedan extends Car = Inheritance, Overriding = Polymorphism).
Tip 2: Revise Access Specifiers (public, private, protected) with practical examples. Many interviewers check if you understand how inheritance behaves with different access modifiers.
Tip 3: Be clear about Compile-time vs. Run-time polymorphism (overloading vs. overriding). Always mention virtual functions and vtable/vptr when asked about Run-time polymorphism.
Tip 4: Understand Constructors & Destructors properly (default, parameterized, copy, destructor). Common question: What gets called first in inheritance? (Answer: Base constructor, then derived constructor. For destructors, the order is reversed).

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is recursion?