Tip 1 : Do company specific questions
Tip 2 : Keep revising old concepts
Tip 1 : Mention all projects and experience in detail
Tip 2 : Link of coding profiles and projects



1. Using recursion
2. Using slow and fast pointer
3. Normal pointer operations



In the given linked list, there is a cycle, hence we return true.

1. Using recursion
2. Using slow and fast pointer
3. Normal pointer operations



Input: Linked List: 1 <-> 2 <-> 2 <-> 2 <-> 3
Output: Modified Linked List: 1 <-> 2 <-> 3
Explanation: We will delete the duplicate values ‘2’ present in the linked list.
1. Using recursion
2. Using slow and fast pointer
3. Normal pointer operations



Consider below matrix of characters,
[ 'D', 'E', 'X', 'X', 'X' ]
[ 'X', 'O', 'E', 'X', 'E' ]
[ 'D', 'D', 'C', 'O', 'D' ]
[ 'E', 'X', 'E', 'D', 'X' ]
[ 'C', 'X', 'X', 'E', 'X' ]
If the given string is "CODE", below are all its occurrences in the matrix:
'C'(2, 2) 'O'(1, 1) 'D'(0, 0) 'E'(0, 1)
'C'(2, 2) 'O'(1, 1) 'D'(2, 0) 'E'(3, 0)
'C'(2, 2) 'O'(1, 1) 'D'(2, 1) 'E'(1, 2)
'C'(2, 2) 'O'(1, 1) 'D'(2, 1) 'E'(3, 0)
'C'(2, 2) 'O'(1, 1) 'D'(2, 1) 'E'(3, 2)
'C'(2, 2) 'O'(2, 3) 'D'(2, 4) 'E'(1, 4)
'C'(2, 2) 'O'(2, 3) 'D'(3, 3) 'E'(3, 2)
'C'(2, 2) 'O'(2, 3) 'D'(3, 3) 'E'(4, 3)
For each word in the dictionary, I tried to find that word individually and match characters. If a character matched then search for the next character in the word in adjacent cells. If it is also matching then continue the process, otherwise start the same process again from the next cell onwards.
But the complexity will be very high for this approach and the interviewer was not satisfied.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?