Question
In Java, which interface defines the basic operations
for a queue, and which class is a common concrete implementation that supports these operations with efficient O(1) time complexity for offer and poll?Solution
In Java, java.util.Queue is the interface that defines queue operations. java.util.LinkedList is a common concrete class that implements the Queue interface and provides O(1) time complexity for offer() (enqueue) and poll() (dequeue) operations when used as a queue.
Which articles of the Constitution of India prohibit bonded labour?
The balanced reaction for following chemical reaction is:Â
Barium sulphate + Aluminium chloride → Barium chloride + Aluminium sulphateÂ
The profit earned after selling an article for Rs.1825 is the same as loss incurred after selling the article for Rs.1245. What is the cost price of the...
Match List-I with List-II and select the correct answer using the code given below the lists:
30 men can complete a piece of work in 48 days. ‘x’ men started the work and after 33 days 64 more men joined them so that whole work was finished i...
The percentage (%) of Carbon in the atmosphere, by volume, is:
If '+' means '÷', '−' means '×', '×' means '+', '÷' means '−', what will come in place of the question mark (?) in the following equation?
<...A man spent 45% of his income in May. If his savings is increased by 20% in June and becomes Rs. 13200, then find the income of man in May.
Language that the computer understands and executes?
Which one of the following pairs of Zonal Railways and their Headquarters is not correctly matched?