You are on page 1of 1

ASSIGNMENT 1 (Unit 1 & Unit 2)

1) Write a program to implement Stack using queue. (Use the minimum required number
of queues).
2) Write a program to implement Queue using Stack. (Use the minimum required number
of stacks).
3) Write a program to implement the following operations on Max priority circular queue
(i) Insertion (ii) Deletion (iii) Display
4) Given a Linked List of integers, write a program to delete nodes which have a greater
value on right side.
5) Write a program to get the nth node from the last of a linked list.

6) Given a Linked List of integers, write a program to modify the linked list such that all
even numbers appear before all the odd numbers in the modified linked list. If the list
has only odd or only even numbers, need not change anything.
7) Write a program to implement the function AlternatingSplit() that takes one doubly
linked list and divides up its nodes to make two smaller doubly linked lists ‘a’ and ‘b’.
The sublists should be made from alternating elements in the original list. So if the
original list is 0 <->1<->0<->1<->0<->1 then one sublist should be 0<->0<->0 and the
other should be 1<->1<->1.
8) Write a Program to reverse the doubly linked list. If the list is 50 <->61<->70<->81<-
>90<->41 then the output is 41<-9>0<->81<->70<->61<->50
9) Write a program to implement SortedMerge() function that takes two circular linked
lists, each of which is sorted in increasing order, and merges the two together into one
circular linked list which is in increasing order. SortedMerge() should return the new
list.
10) Write a program for the non-recursive implementation of Pre-order and Post-order
traversal using threaded binary tree.
11) Write a Program to convert the given Infix, prefix and postfix expressions to binary
tree. (Binary Tree should be displayed in Tree structure).
12) Write a program to implement AVL tree. (Insertion, Deletion and Display)
13) Write a program to implement open addressing methods. ( Linear probing, Quadratic
probing and Double hashing)

1,2,3,5,7,8,9,12,13………………….6,4,10,11

You might also like