Which data structure is used in redo-undo feature?
Explanation: Stack data structure is most suitable to implement redo-undo feature. This is because the stack is implemented with LIFO(last in first out) order which is equivalent to redo-undo feature i.e. the last re-do is undo first. Consider a situation where a client receives packets from a server. There may be differences in speed of the client and the server. Which data structure is best suited for synchronization? (A) Circular Linked List (B) Queue (C) Stack (D) Priority Queue Answer: (B) Explanation: Since packets need to be processed in First In First Out order, a queue can be used for synchronization. A data structure is required for storing a set of integers such that each of the following operations can be done in (log n) time, where n is the number of elements in the set. o Delection of the smallest element o Insertion of an element if it is not already present in the set Which of the following data structur...
https://www.geeksforgeeks.org/zigzag-or-diagonal-traversal-of-matrix/
ReplyDelete