21. Which of the following is true for computation time in insertion, deletion and finding maximum and minimum element in a sorted array?
(1) Insertion-O(1), Deletion-O(1), Maximum-O(1), Minimum-O(1)
(2) Insertion-O(1), Deletion-O(1), Maximum-O(n), Minimum-O(n)
(3) Insertion-O(n), Deletion-O(n), Maximum-O(1), Minimum-O(1)
(4) Insertion-O(n), Deletion-O(n), Maximum-O(n), Minimum-O(n)
22. The seven elements A, B, C, D, E, F and G are pushed onto a stack in reverse order, i.e., starting from G. The stack is popped five times and each element is inserted into a queue. Two elements are deleted from the queue and pushed back onto the stack. Now, one element is popped from the stack. The popped item is ...................
23. Which of the following is a valid heap?
24. If h is chosen from a universal collection of hash functions and is used to hash n keys into a table of size m, where n≤m, the expected number of collisions involving a particular key x is less than ...................
25. Which of the following statements is false?
(A) Optimal binary search tree construction can be performed efficiently using dynamic programming.
(B) Breadth-first search cannot be used to find connected components of a graph.
(C) Given the prefix and postfix walks of a binary tree, the tree cannot be re-constructed uniquely.
(D) Depth-first-search can be used to find the components of a graph.
26. Match the following Layers and Protocols for a user browsing with SSL:
a. Application of layer i. TCP
b. Transport layer ii. IP
c. Network layer iii. PPP
d. Datalink layer iv. HTTP
a b c d
(1) iv i ii iii
(2) iii ii i iv
(3) ii iii iv i
(4) iii i iv ii
27. The maximum size of the data that the application layer can pass on to the TCP layer below is .........
(1) 216 bytes
(2) 216 bytes + TCP header length
(3) 216 bytes - TCP header length
(4) 215 bytes
28. A packet whose destination is outside the local TCP/IP network segment is sent to ..............
(1) File server
(2) DNS server
(3) DHCP server
(4) Default gateway
29. Distance vector routing algorithm is a dynamic routing algorithm. The routing tables in distance vector routing algorithm are updated ...........
(2) by server
(3) by exchanging information with neighbour nodes.
(4) with back up database
30. In link state routing algorithm after construction of link state packets, new routes are computed using:
(1) DES algorithm
(2) Dijkstra's algorithm
(3) RSA algorithm