Answers MCQ
Answers MCQ
Answers MCQ
2 A data structure in which elements can be inserted or deleted at/from both ends but not in
the middle is?
a) Queue
b) Circular queue
c) Dequeue
d) Priority queue
a) Infix Expression
b) Prefix Expression
c) Postfix Expression
a) Reversing a string
c) Implementation of recursion
d) Job scheduling
5 Which of the following statement(s) about stack data structure is/are NOT correct?
a) Linked List are used for implementing Stacks
d) Null link is present in the last node at the bottom of the stack
6 A normal queue, if implemented using an array of size MAX_SIZE, gets full when?
a) Rear = MAX_SIZE – 1
b) Front = (rear + 1)mod MAX_SIZE
c) Front = rear + 1
d) Rear = front
a) True
b) False
8 If the size of the array used to implement a circular queue is MAX_SIZE. How rear moves to
traverse inorder to insert an element in the queue?
a) rear=(rear%1)+MAX_SIZE
b) rear=(rear+1)%MAX_SIZE
c) rear=rear+(1%MAX_SIZE)
d) rear=rear%(MAX_SIZE+1)
a) HashMap
b) Hashtable
c) EnumMap
d) Vector
a) Reference equality
b) Name equality
c) Hashcode equality
d) Length equality
14 ………. is putting an element in the appropriate place in a sorted list yields a larger sorted
order list.
A. Insertion
B. Extraction
C. Selection
D. Distribution
16 If large number of items are stored in hash bucket, what happens to the internal structure?
b) The bucket will increase its size by a factor of load size defined
18 What is the correct method used to insert and delete items from the queue?
a) push and pop
b) enqueue and dequeue
c) enqueue and peek
d) add and remove
a) True
b) False
21 While finding the correct location for saving key value pair, how many times the key is
hashed?
a) 1
b) 2
c) 3
a. Immutable Set
b. Mutable Set
c. The type of Set depends on the parameter passed to the emptySet() method
d. Null object
23 What is the relation between hashset and hashmap?