Which of the following is the best time for an algorithm?
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.
Which of the following is the best time for an algorithm?
The Ackerman function, for all non-negative values of m and n is recursively defined as A ( m, n ) = i) n + 1 if m = 0 ii) A ( m - 1, 1 ) if m ! = 0 and n = 0 iii) A ( m - 1 ), A ( m, n - 1 ) if m ! = 0, n ! = 0 Therefore the value of A ( 1, 2 ) is
The best case time complexity of Bubble sort technique is
A linear list in which elements can be added or removed at either end but not in the middle, is known as
Which of the following sorting procedures is the slowest?
In array representation of Binary tree, if the index number of a child node is 6 then the index number of its parent node is
Maximum number of edges in a n-node undirected graph without self loop is
Four algo do the same task. Which algo should execute the slowest for large values of n?
The adjacency matrix of an undirected graph is
BFS constructs
Convert the following infix expression into equivalent postfix expression using stack. ( A + B ) * C - ( D - E ) / ( F + G ).
What is dequeue?
How a polynomial such as 6x⁶ + 4x³ - 2x + 10 can be represented by a linked list?
What are the advantages and disadvantages of linked list over an array?
Define Big O notation. Show that the function f ( n ) defined by F ( 1 ) = 1 F ( n ) = f ( n - 1 ) + 1/n for n > 1 has the complexity O ( log n ).
Write down the recursive definition for generation of the Fibonacci sequence.
Assuming Fib ( n ) is a recursive function, draw a recursive tree for Fib ( 6 ).
What is the precondition of performing binary search in an array? Write the Binary Search algorithm.
What is Circular queue? Write Q-insert algorithm for the circular queue.
Construct the expression tree for the following expression: E = ( 2a + 5b ) ( x - 7y )⁴.
Write the recursive function for the problem of Tower of Hanoi problem.
Write a C function for selection sort and also calculate the time complexity for selection sort.
Show the stages in growth of an order - 4 B-tree when the following keys are inserted in the order given: 74 72 19 87 51 10 35 18 39 60 76 58 19 45
How do AVL trees differ from binary search tree? Insert the following keys in the order given below to build them into an AVL tree: 8 12 9 11 7 6 Clearly mention different rotations used and balance factor of each node.
Explain with suitable example the principle of operation of Quick sort.
Given the preorder and inorder sequence and draw the resultant binary tree and write its postorder traversal: Pre-order: A B D G H E I C F J K In-order: G D H B E I A C J F K
Write non-recursive algorithm for inorder traversal of a binary tree.
Write an algorithm to search a node in a binary search tree.
Define 'Hashing'.
Explain with a suitable example the collision resolution scheme using linear probing with open addressing.
What is index? What are the various types of indexing? State the advantages of using indexing over a sequential file.
Discuss the differences between command file and executable file.
Write short notes on any three of the following: Radix sort
Write short notes on any three of the following: Index sequential file ordering
Write short notes on any three of the following: Tail recursion
Write short notes on any three of the following: Threaded binary tree
Write short notes on any three of the following: BFS vs DFS.