0% found this document useful (0 votes)
7 views3 pages

QB M3M4

The document outlines various programming tasks related to data structures, including differences between arrays and linked lists, C functions for manipulating linked lists, and binary tree traversals. It also covers concepts such as circular linked lists, threaded binary trees, and binary search trees, along with their definitions, representations, and algorithms. Additionally, it includes exercises on constructing trees from traversal sequences and understanding graphs and their representations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views3 pages

QB M3M4

The document outlines various programming tasks related to data structures, including differences between arrays and linked lists, C functions for manipulating linked lists, and binary tree traversals. It also covers concepts such as circular linked lists, threaded binary trees, and binary search trees, along with their definitions, representations, and algorithms. Additionally, it includes exercises on constructing trees from traversal sequences and understanding graphs and their representations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

1. Write the differences between arrays and linked lists.

2. Write C functions to (i) delete a node from doubly linked list from the front. (ii) Concatenate two linked
lists.

3. Write a C Program to reverse a linked list.

4. Show the diagrammatic linked representation for the following sparse matrix.
0 1 0 0
0 0 2 0
5 0 0 7
0 4 0 0

5. Write C functions to implement the following in a doubly linked list


(i) Insert node at the front (ii) delete node from the end

6. Write recursive C functions for inorder, preorder and postorder traversals of a binary tree. Also, find all
the traversals for the given tree.

7. Define Binary tree. Explain the array and linked representations of a binary tree with a suitable example.

8. What is a circular linked list? Write a C Program to create a circular linked list.

9. Give the binary tree representation for the tree given.

10. Explain the algorithm for iterative inorder traversal of a binary tree with an example. Show the stack
contents at each step.
11. With suitable examples, define
(i) Degree of a node (ii) Level of a binary tree (iii) Complete binary tree (iv) Full binary
tree

12. What is level order traversing of a binary tree? Explain with an example tree and show the contents of
queue at each step.

13. What is a Threaded Binary Tree (TBT)? State the rules to construct TBT. Construct TBT for the
following binary tree and show the threads.

14. Why are Threaded Binary Trees (TBT) required? Give the structure for TBT. Differentiate between
TBT and normal binary tree.

15. How is the problem of loose (dangling) threads handled in Threaded Binary Tree. Explain with an
example tree.

16. Explain the procedure for inorder traversal of TBT along with an example tree.

17. How do you insert a node into TBT? Explain the procedure with an example tree.

18. Represent the polynomial using a structure. Explain the algorithm with an example to add two
polynomials along linked list representation for POLY1, POLY2 and POLYSUM polynomials.

19. Define Binary Search Tree (BST) with an example.

20. Write the recursive and iterative functions to search a key in BST. Analyse their performance in terms
of time and space complexity.

21. Explain the entire deletion process (leaf node, node with one child and node with both children) in BST
with examples.

22. Write a short note on height of a BST.

23. Construct BST for the given set of numbers: 14,15,4,9,7,18,3,5,16,20. Show the and steps and
intermediate trees. Also perform inorder, preorder and postorder traversals of the resultant tree.

24. Define the following (i) Selection tree (ii) Winner tree and (iii) Looser tree.

25. Form the looser tree and find out the winner of the tournament for the following runs.

Explain the steps involved with neat tree diagrams.


26. What is a Forest? Transform the following forest into binary tree.

27. Build the binary tree step by step for the following traversal sequences:
Inorder: E A C K F H D B G
Preorder: F A E K C D H G B
Also perform postorder traversal of the resultant tree.

28. For a Binary tree, Prove that n0 = n2 + 1 where n0 is the number of leaf nodes and n2 is the number of
nodes with degree 2.

29. What is a graph? Explain directed and undirected graph with an example for each.

30. Explain the adjacency matrix and adjacency list representation for the graph with examples.

You might also like