A graph G with n nodes bipartite if it contains
Official theoretical question paper for Data Structure Algorithms (PCC-CS301) conducted by Maulana Abul Kalam Azad University of Technology. All questions from Groups A, B, and C are reproduced below with marks weightings.
A graph G with n nodes bipartite if it contains
The postfix equivalent of the prefix * + ab - cd is
A sort which compares adjacent elements in a list and switches where necessary is
The following sequence of operations is performed on a stack : push (1), push (2), pop, push (1), push (2), pop, pop, pop, push (2), pop. The sequence of popped out values are
The initial configuration of queue is a, b, c, d ('a' is at the front). To get the configuration d, c, b, a one needs a minimum of
Which of the following sorting techniques requires extra space, than the data to be stored ?
Which of the following methods has the best average case complexity for searching ?
A binary search tree is generated by inserting in order the following integers : 50, 15, 62, 5, 20, 58, 91, 3, 8, 37, 60, 24. The number of nodes in the left subtree and right subtree of the root respectively is
The technique of linear probing for Collision Resolution can lead to
Inserting a new node after a given node in a doubly Linked list requires
Prove that for any non-empty binary true T, if n₀ is the number of leaves and n₂ be the number of nodes having degree 2, then n₀ = n₂ + 1.
Write an algorithm for inorder traversal of a threaded binary tree.
a) How can a polynomial such as 6x⁶ + 4x³ - 2x + 10 be represented by a linked list ? b) Suggest an algorithm to reverse the direction of all the links of a singly linked list.
a) Explain f(n) = O (g(n)). b) What is the advantage of binary search over linear search ?
Compare linked list with array in respect of both advantages and disadvantages.
a) Define a directed graph. Provide an example. b) Discuss about the following terminology i) Indegree ii) Sink iii) Cycle iv) Network. c) Define adjacency matrix corresponding to a digraph. d) Draw the graph corresponding to the following bit matrix : A = | 0 | 0 | 0 | 1 | |---|---|---|---| | 1 | 0 | 1 | 1 | | 1 | 0 | 0 | 1 | | 0 | 0 | 1 | 0 | e) What is path matrix ? f) Count the total number of nodes of a binary tree having depth n.
a) Let a & b denotes positive integers. Suppose a function Q is defined as follows : Q(a, b) = { Q(a - b, b) + 1 if b <= a } { 0 if a < b } Find the value of Q(2, 3) and Q(14, 3). b) Transform the following expression to the expression in Postfix notation : A * (B + D) / E - F * (G + H / K) c) Why is the Queue Data Structure called FIFO ? d) Construct the following Queue of characters where Queue is a circular array which is allocated six memory cells. FRONT = 2 REAR = 4 QUEUE : _, A, C, D, _, _ Describe the Queue as the following operations take place : i) F is added to the Queue. ii) Two letters are from the Queue. iii) K, L, M are added to the Queue. iv) Two letters are deleted from the Queue. v) R is added to the Queue. vi) One letter is deleted from the Queue.
a) The inorder & preorder traversal sequence of nodes in a binary tree are given below : Inorder : D G B A H E I C F Preorder : A B D G C E H I F. Draw the binary tree. State briefly the logic used to construct the tree. b) Insert the following keys in the order given below to build them into an AVL tree. g, h, s, l, e, m, t, u. Clearly mention different rotations used and balance factor of each node. c) What is 2-way threading ?
a) What is BST ? b) For the following Graph Find i) BFS Traversal ii) DFS Traversal. c) Explain with a suitable example the principles of operation of Heap sort. d) Find the Time Complexity of the above algorithm.
Write short notes on any three of the following : a) AVL Tree b) Tail Recursion c) Collision Resolution using chaining d) Dequeue — operation & application e) Warshall's Algorithm.