Tip 1: Do one major project and one medium project.
Tip 2: Solve at least 300+ coding questions.
Tip 3: Participate in mock interviews.
Tip 1: Concise and important points should be bold.
Tip 2: Skills and projects should be properly written.
It was in the evening around 6 PM and lasted for 90 minutes.



You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed. All houses at this place are arranged in a circle. That means the first house is the neighbour of the last one. Meanwhile, adjacent houses have a security system connected, and it will automatically contact the police if two adjacent houses are broken into on the same night. Given an integer array nums representing the amount of money in each house, return the maximum amount of money you can rob tonight without alerting the police.
Intuition
Robbers have 2 choices either rob this house or the neighbouring house
The neighbourhood is designed circularly.
To fix this
first, we make him start from house no 2 up to the last house
next time we make him go from house 1 to the second last house
Since we are calculating every possibility we use recursion
To optimize the solution we use dp
Approach
The first and second move is where the robber goes from either 1st house to the second last or the second house to the last house.



We have n jobs, where every job is scheduled to be done from startTime[i] to endTime[i], obtaining a profit of profit[I]. You're given the startTime, endTime and profit arrays, and return the maximum profit you can take such that there are no two jobs in the subset with overlapping time ranges. If you choose a job that ends at time X you will be able to start another job that starts at time X.
Use the array for the job with info (startTime, endTime, profit)
Sort the vector for the jobs[i]=(startTime[i], endTime[i], profit[i]).
Use the binary search (C++ upper_bound) to find the index next[i] for the target {jobs[i][1], 0, 0}={endTime[i], 0, 0} where endTime[i] is according to sorting.
Use DP to find the maximal profit



Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0. Notice that the solution set must not contain duplicate triplets.
Sort the input array
Initialize a set to store the unique triplets and an output vector to store the final result
Iterate through the array with a variable i, starting from index 0.
Initialize two pointers, j and k, with j starting at i+1 and k starting at the end of the array.
In the while loop, check if the sum of nums[i], nums[j], and nums[k] is equal to 0. If it is, insert the triplet into the set and increment j and decrement k to move the pointers.
If the sum is less than 0, increment j. If the sum is greater than 0, decrement k.
After the while loop, iterate through the set and add each triplet to the output vector.
Return the output vector
The interview was scheduled for 10 AM and lasted for 60 minutes. The environment was quiet and peaceful. The interviewer was cooperative and helpful.



You are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the ith line are (i, 0) and (i, height[I]). Find two lines that together with the x-axis form a container, such that the container contains the most water. Return the maximum amount of water a container can store. Notice that you may not slant the container.
The two-pointer technique starts with the widest container and moves the pointers inward based on the comparison of heights.
Increasing the width of the container can only lead to a larger area if the height of the new boundary is greater. By moving the pointers towards the centre, we explore containers with the potential for greater areas.
Explain the Concept of Process in OS, Pillars of OOPS, and Virtual function.
Tip 1:Stay confident
Tip 2: Answer as much as you remember
Tip 3: Don't answer wrong
Explain Runtime polymorphism.
What is deadlock and what are the conditions of deadlock? (Learn)
Just 5 minutes after the first round ended, I received a call for the second round.
Explain all tree traversal techniques and which ones are better iterative or recursive. (Learn)
I explained all the 3 pre-order, in-order and post-order traversal of the tree firstly recursively and then iteratively and explained how the recursive approach takes extra stack space and is harder to debug.
Given a scenario that a manager is alloted to many employees, how can that entity be assigned to many in tables?
Tip 1: Be thorough with the concepts
Tip 2: Be present and ask for inputs if necessary
Tip 3: Communicate

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