Tip 1 : Practice at least 250 Questions
Tip 2 : Do at least 2 projects
Tip 1 : Have some projects on resume.
Tip 2 : Do not put false things on resume.


If the given matrix is:
[ [1, 2, 5],
[3, 4, 9],
[6, 7, 10]]
We have to find the position of 4. We will return {1,1} since A[1][1] = 4.



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'.




The sine wave for the matrix:-
1 2
3 4
will be [1, 3, 4, 2].



Input: arr[] = {1,1,1,2,2,2}
Output: {1,2,1,2,1,2}
Note: {2,1,2,1,2,1} is also valid because there are no two adjacent elements which are the same.

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