Question
A is cycling at an average speed of 20 km/hr such that
he can reach a certain point at 12 noon. If he cycles at 60 km/hr, then he will reach the destination at 10 a.m. At what speed he should cycle to reach the destination at 11 a.m.Solution
Let the distance to be travelled be ‘x’ km Time taken when speed is 20 km/hr = (x/20) hours Time taken when speed is 60 km/hr = (x/60) hours According to the question, (x/20) – (x/60) = 2 Or, 3x – x = 2 × 60 Or, 2x = 120 km Or, x = 60 km Time taken to travel 60 km with speed of 20 km/hr = 60/20 = 3 hours Therefore, he started at 12 – 3 = 9 a.m. Therefore, required speed to reach the destination at 11 a.m. or 2 hours = 60/2 = 30 km/hr
Which algorithm is used for computing Max-Flow in a network?
Given the following code snippet, which operation is performed on the binary tree to produce the output: 4, 2, 5, 1, 3 ?
class Node {Â Â Â Â Â in...Which data structure is most suitable for implementing a priority queue with logarithmic time complexity for insertion and deletion?
Tarjan’s algorithm is used to find:
In C++, which access specifier makes members accessible only from within the class itself and from friend functions/classes?
What is the worst-case time complexity for inserting an element into a hash table that uses separate chaining for collision resolution?
In a graph, what is the maximum number of edges in a simple undirected graph with 'n' vertices?
Time complexity of heap sort is:
Which of the following is true about triggers in a relational database?
What is the primary purpose of an abstract class?