Tip 1 : Make your resume and LinkedIn profile strong.
Tip 2 : Prepare for both Data Structures (topic-wise and company-wise) and competitive programming.
Tip 3 : Apply through referral and read some past interview experience
Tip 1:Include relevant past experience.
Tip 2:Achivements section.
Input : 1 -> 2 -> 3 -> 4 -> 'NULL' and 'K' = 2
Output: 1 -> 2 -> 4 -> 'NULL'
Explanation:
After removing the second node from the end, the linked list become 1 -> 2 -> 4 -> 'NULL'.
Step 1: The idea to approach this problem is to find the size of the whole linked list and then delete the N-K+1 node from the start. Take two-pointers and delete the required node.
Step 2: Then I optimized the solution by reducing the pointers to one.
Step 3: Further optimized the solution by reducing the extra traversal for finding the size of the linked list. We can maintain two pointers and increase the first pointer up to K and then increase both first and second pointer till first reaches to end.
Now delete the second pointer as it will be at the Kth position from the last.
1. The grid has 0-based indexing.
2. A rotten orange can affect the adjacent oranges 4 directionally i.e. Up, Down, Left, Right.
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?