DATA STRUCTURE INTERVIEW QUESTION & ANSWERS
Technical
Follow Us
56. | What do you mean by the terms average case, best case and worst case time complexity? |
---|---|
Average case : The time complexity which we get for certain set of input as a average value then it is called the average case time complexity. Best case : The time complexity which we get is very minimum for particular inputs then it is called the best case time complexity. Worst case : The time complexity which we get for certain inputs if maximum then we call it as the worst case time complexity. |
57. | What are the difference between ascending priority queue and descending priority queue? |
---|---|
Ascending Priority Queue : It is a collection of items in which the items can be inserted arbitrarily but only smallest element can be removed. Descending Priority Queue : It is a collection of items in which insertion of items can be in any order but only largest element can be removed. |
58. | What is an ordered list? |
---|---|
Is nothing but a set of elements. Such a list sometimes called as linear list. |
59. | What is multi way merge? |
---|---|
Multi way merge is a process of combining more than two sorted data stream into single sorted stream. |
60. | How many nonleaf nodes are there in a binary tree of maximum of N leaf nodes? |
---|---|
In a binary tree, when there are a maximum number of leaf nodes (N), it has (N – 1) non leaf nodes. |