Question
Karan, Arjun and Krunal alone can complete a work in 50,
75 and 60 days respectively. All of them started working together but after 9 days from start Karan left the job and after 15 more days Arjun also left the job. So for how many days did Krunal work?Solution
Let the total work = 300 units (LCM of 50, 75 and 60) Amount of work done by Karan alone in one day = 300/50 = 6 units Amount of work done by Arjun alone in one day = 300/75 = 4 units Amount of work done by Krunal alone in one day = 300/60 = 5 units Amount of work done by Karan, Arjun and Krunal together in 9 days = 9 × (6 + 4 + 5) = 135 units Amount of work done by Arjun and Krunal together in 15 days = 15 × (4 + 5) = 135 units Remaining work = 300 – 135 – 135 = 30 units So, the time taken by Krunal alone to complete 30 units work = 30/5 = 6 days So, Krunal worked for 6 + 15 + 9 = 30 days
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.