In an "N" element integer sorted array, a particular elements is repeating "(N/2)+1" times. How much time it take to find the repeating element.
Can someone please write a C program to reverse "N" nodes of list. In the above question N= 3. Program should be generic so it can work for any value assigned to N.
Input List => 1 2 3 4 5 6 7 8 9 10 11 Output List => 3 2 1 6 5 4 9 8 7 10 11 for N=3
Input List => 1 2 3 4 5 6 7 8 9 10 11 Output List => 4 3 2 1 8 7 6 5 9 10 11 for n=4
Given a binary tree print it in inward spiral order i.e first print level 1, then level n, then level 2, then n-1 and so on.
For Ex -
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Print- 1 15 14 13 12 11 10 9 8 2 3 7 6 5 4