Analysis of Algorithms and Computational Complexity
Analysis of Algorithms and Computational Complexity
1. The variables which can be accessed by all modules in a program, are known as
- local variables
- internal variables
- external variable
- global variables
2. In what kind of storage structure for strings, one can easily insert, delete, concatenate and rearrange substrings ?
- fixed length storage structure
- variable length storage with fixed maximum
- linked list storage
- array type storage
3. which of the following operations is performed more efficiently by doubly linked list than by linear linked list
- Deleting a node whose loxationis given
- Searching an unsorted list for a given item
- Inserting a node after the node with a given location
- Traversing the list to process each node
4. A linear list in which elements can be added or removed at either end of but not in the middle is known as
- queue
- deque
- stack
- tree
5. A binary tree in which if all its levels except possibly the last, have the maximum number of nodes and all the nodes at the last level appear as far left as possible, is known as
- full binary tree
- 2-tree
- threaded tree
- complete binary tree
6. A list of integers is read in, one at a time, and a binary search tree is constructed. Next the tree is traversed and the integers are printed. Which traversed would result in a printout which duplicates the original order of the list of integers?
- preorder
- postoder
- inorder
- none of these
7. The five items : A,B,C,D, and E are pushed in a stack, one after the other starting from A. The stack is popped four times and each element is inserted in a que. Then two elements are deleted from the queue and pushed back on the stack. Now one item is popped from the stack. The popped item is
- A
- B
- C
- D
8. If each node in a tree has value greater than every value in its left subtree and has value less than every value in its right subtree, the tree is known as
- complete tree
- full binary tree
- binary search tree
- threaded tree
9. Which of the following sorting procedure is the slowest
- Quick sort
- Heap sort
- Shell sort
- Bubble sort
10. Which of the following is a tabular listing of contents of certain registers and memory locations at different times during the execution of a program ?
- Loop program
- Program trace
- subroutine program
- byte sorting program