Q1
Reverse adjacent nodes in a linked list
Q2
Print the binary tree using Breadth First Traversal but reverse the elements of every nth breadth
![http://mathworld.wolfram.com/images/eps-gif/CompleteBinaryTree_1000.gif]
We need to print the tree using breadth first traversal but need to reverse the elements of every nth breadth from a provided starting point. I have used additional stack with queue to get the desired functionality. It will be more easier for users to understand the problem after running the code and seeing the output.
Q3
Find the path in 2 Dimensional array which has the most 1
For ex: If array has values
1 1 0 1 0 1 1 0 1 0 0 1
So here the path containing max 1 is arr[0][0], arr[0][1], arr[1][1], arr[1][2], arr[1][3] and arr[2][3]
Q4
Balanced BST
6
3 8
1 4 7 12
sum = 16 o/p should be 4 and 12
Q5
URL Detection
1) Detect url assuming that MS Word engine streams the characters to your function BOOL DetectURL(UCHAR chUserCharEntry) 2) Once #1 is completed then execute the url from IE
Q6
Find position of a string in another string
Q7
Find position of a string in another string.
Q8
Given a preorder and a postorder traversal, construct the tree.
Q9
Number of occurrences of a number in a sorted array.
Q10
Find the intervals from a set of intervals in which a given point lies