Thursday, August 19, 2010

Programming questions asked in Global Scholar

here are the some programming questions...
1. given the linked list with one character at each node.. our work is to find whether the given linked list is palindrome or not ?

2. Given an array .. 1, 2 , 0 , 5 , 8 , 9 , 3 , 6
output:
1,2 //increasing thread
2,0 //decreasing thread
0,5,8,9 //increasing thread
9,3 //decreasing thread
3,6 //increasing thread

3. given a binay tree...
print the elements in the zig-zag order.
eg. ---->1----------------->
<---------2 3<---------------
----->4 5 6 7--------->
8 9<-----------

No comments:

Post a Comment