Tip 1: Never skip any topic from any chapter or subject.
Tip 2: Learn to explain your thoughts clearly and confidently.
Tip 3: Learn from past experiences, previous interviews, and commonly asked problems.
Tip 4: Include at least 4 well-structured projects in your resume.
Tip 1: Include at least 4 projects on your resume.
Tip 2: Never write anything false on your resume. You will always get caught — so be honest and genuine.
After the preliminary assignment, the interview was scheduled. The interviewer asked only data structures and algorithms problems, along with questions related to my projects in this round.



A substring is a contiguous segment of a string.
dp(i, j) represents whether the substring s(i ... j) forms a palindrome. dp(i, j) is true if s(i) is equal to s(j) and the substring s(i+1 ... j-1) is also a palindrome. Whenever a palindrome is found, we check if it is the longest one so far. The time complexity is O(n^2).



The Linked Lists, where a1, a2, c1, c2, c3 is the first linked list and b1, b2, b3, c1, c2, c3 is the second linked list, merging at node c1.

In the first iteration, we reset the pointer of one linked list to the head of the other linked list after it reaches the tail node. In the second iteration, we move both pointers until they point to the same node. The operations in the first iteration help counteract the difference in length between the two lists. Therefore, if the two linked lists intersect, the meeting point in the second iteration will be the intersection node. If the two linked lists do not intersect at all, the meeting point in the second iteration will be the tail node of both lists, which is null.
This round was conducted by the hiring manager. I was asked several questions related to Java, Spring Boot, and APIs since I had mentioned them in my resume. The round concluded with a Data Structures and Algorithms problem.



1. The helper function ‘knows’ is already implemented for you.
2. ‘knows(A, B)’ returns "false", if A doesn't know B.
3. You should not implement helper function ‘knows’, or speculate about its implementation.
4. You should minimize the number of calls to function ‘knows(A, B)’.
5. There are at least 2 people at the party.
6. At most one celebrity will exist.
Create two indices, i and j, where i = 0 and j = n-1.
Run a loop until i is less than j.
After the loop, i will be the potential celebrity candidate.
Finally, verify whether this candidate is actually a celebrity by running another loop from 0 to n-1 to check two conditions for every person:
If either of these conditions fails, return -1. Otherwise, at the end of the loop, we can confirm that the candidate is indeed the celebrity.

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