Data Structure & Algorithms Question and Answer
Data Structure & Algorithms Question and Answer
11. If every node u in G is adjacent to every other node v in G, A graph is said to be
- Isolated
- Complete
- Finite
- Strongly connected
12. A variable P is called pointer if
- P points to the address of first element in DATA
- P can store only memory addresses
- P contain the DATA and the address of DATA
- P contains the address of an element in DATA.
13. The Worst case ocur in linear search algorithm when
- Item is not in the array at all
- Item is the last element in the array
- Item is the last element in the array or is not there at all
- None of above
14. The Average case occur in linear search algorithm
- When Item is somewhere in he middle of the array
- When Item is not in the array at all
- When Item is the last element in the array
- All the above
15. The complexity of the average case of an algorithm is
- Much more complicated to analyze than that of worst case
- Much more simpler to analyze than that of worst case
- Sometimes more complicated and some other times simpler than that of worst case
- None of above
16. The following data structure allows deleting data elemtnts from front and inserting at rear
- Stacks
- Queues
- Deques
- Binary search tree
17. This data structure allows deletions at both ends of the list but insertion at only one end.
- Input-restricted deque
- Output-restricted deque
- Priority queues
- None of the above
18. The follwing data structure is non-linear type
- Strings
- Lists
- Stacks
- None of the above
19. The following data structure is non-linear type
- Strings
- Lists
- Queues
- All of the above
20. To represent hierachical relationship between elements, the following data structure is not suitable
- Deque
- Priority
- Tree
- All of above