Link to home
Create AccountLog in
Avatar of avinash_takale
avinash_takale

asked on

Data Structure Puzzle

Hi Expert's

        Can Any one send me liunk for Data Structure Puzzle's and Problem So that i can try to solve it

Thanx
Avi
 
   
Avatar of sunnycoder
sunnycoder
Flag of India image

Hi avinash_takale,

1) Given an singly linked list and poisition "n", we have to remove the nth item from end.
2) Remove the duplicates in an array.
3) Find if there is a loop in a linked list
4) Shift ahead a block of elements in an array
5) Implement two stacks in one array
6) find first common ancestor for any two nodes in a tree
7) Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it.
8) Reverse a linked list.
9) Extracting unique elements from a sorted list
10) Given a singly linked list, print out its contents in reverse order.
11) Given a singly linked list, find the middle of the list.
12) How do you represent an n-ary tree? Write a program to print the nodes of such a tree in breadth first order.

Cheers!
Sunnycoder
ASKER CERTIFIED SOLUTION
Avatar of sunnycoder
sunnycoder
Flag of India image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Few additions

* Implement "tail" command of unix.
Note: tail prints n number of lines from end of the file.... i.e. last n lines

* You have given a stack library. using that library implement queue.

* Find offset of a member variable in a structure.
Hi Avinash,
If you have an idea about sockets, do the above work as a cliant-server app.
client sends the request and server sends back the response to the client.

Regards
Prashant Sabnekar