Each question below can have one or more correct question. Click the rows that you believe are thq correct answers.
| Q1) Advantages of arrays are:
|
|
Fast access to array elements using index.
|
|
Inserting and deleting items can be expensive as lot of data in array may need to be shifted.
|
|
Arrays store values of one type only; thus avoiding multiple data type complexities.
|
|
If allocated array size is not fully utilized (that is only few index are allocated, rest are unused) , it can lead to wastage of memory.
|
| Q2)Time complexity of matrix to linear search an element in m x n unsorted matrix is:
|
|
O(1)
|
|
O(m*n)
|
|
O(m)
|
|
O(log m*n)
|
| Q3)String data structure is:
|
|
A sequence of characters.
|
|
A primitive data type.
|
|
A sequences of bytes.
|
|
A sequence of words.
|
| Q4)A HashSet :
|
|
Can contain null.
|
|
Stores elements in the same order which it the elements were added to HashSet.
|
|
Can store duplicates.
|
|
Stores key-value pairs.
|
| Q5)A HashMap:
|
|
Stores key-value pairs.
|
|
Can have 0 size.
|
|
Stores key-value pairs in the same order which it the key-value pairs were added to HashMap.
|
|
Is a primitive data type.
|
| Q6)Some types of common LinkedLists are:
|
|
SingleLinkedList.
|
|
TripleLinkedList.
|
|
MatixLinkedList.
|
|
CircularLinkedList.
|
| Q7)Queues :
|
|
Hold elements in LIFO order.
|
|
Hold elements in LIPO order.
|
|
Hold elements in FIFO order.
|
|
Hold elements in FIPO order.
|
| Q8)Stacks are used:
|
|
Algorithms requiring reversal of order.
|
|
Algorithms requiring backtracking.
|
|
History tracking.
|
|
Undo mechanisms, reverting to previous states.
|
| Q9)Node at topmost level of tree is called:
|
|
Leaf.
|
|
Root.
|
|
Branch.
|
|
Degree.
|
| Q10)In a Min heap:
|
|
parent node data value is always greater than its child nodes at all levels.
|
|
parent node data value is always lesser than its child nodes at all levels.
|
| Q11)Common Graph data structures are:
|
|
Bar graph.
|
|
Queued graph.
|
|
Stacked graph.
|
|
None of these.
|
| Q12)Recursion is:
|
|
Recursion consists of method/function code that calls itself only once.
|
|
Recursion consists of method/function code that never calls itself.
|
|
Recursion consists of method/function code that calls itself repeatedly.
|
| Q13)Common search algorithms are:
|
|
Linear search. (A)
|
|
Jump Search. (A)
|
|
Squat search.
|
|
Blind search.
|
| Q14)Best case Time complexity of Quick sort is:
|
|
O(n log n).
|
|
O(log n)
|
|
O(n)
|
|
O(n^2)
|