Question
Tap A can fill a tank in 20 hours and tap B can emptied
it is 25 hours. Tap A starts filling and they opened for 1 hour each alternatively in what time will the tank be full?Solution
Let tank capacity is = 100 ltr LCM of 20 and 25 So tap A can fill it in 20 hours ⴠTap A can fill per hours = 100/20 = 5 ltr Tap B can emptied it in 25 hours ⴠTap B can empty per hours = 100/25 = 4 ltr Tank filled after 2 hour = 5 - 4 = 1 ltr (If taps open alternatively) In last hour tap A fill tank 5 ltr So rest part of tank need to be filled is = 100 - 5 = 95 ltr In 2 hours tank filled = 1 ltr So 95 ltr to be filled in = 95 à 2 = 190 ⴠSo total time = 190 + 1 = 191 hours
Which sorting algorithm divides the array into halves recursively?
In dynamic programming, which principle ensures correctness by solving overlapping subproblems and storing results?
Which of the following operations on a data structure refers to the removal of an element from the front of a queue?
Which of the following algorithms is most appropriate for a sorting task that requires minimal auxiliary space?
In mobile computing, what is the main feature of pervasive computing?
Which of the following is true for the time complexity of binary search?
Recursive problems are implemented by
Which of the following algorithms uses a greedy approach?
The time complexity of computing the all-pairs shortest paths in a dense graph with V vertices using FloydâWarshall is:
In dynamic programming, overlapping subproblems and _________ are key properties.