Question
A and B are travelling towards each other with a speed
of 40 km/hr and 50 km/hr. If they started at same time and A covered 20 km less distance than B before meeting him, then find the distance between them before starting.Solution
Since, the time taken by A and B is same, therefore the ratio of the distance covered by them will be equal to the ratio of their speeds. Therefore, ratio of the distance covered by A and B = 40:50 = 4:5 Let the distance covered by A and B be 4x km and 5x km According to the question, 5x – 4x = 20 Or, x = 20 Therefore, distance between them before starting = 5x + 4x = 9x = 180 km
Which of the following CPU scheduling algorithms is optimal for minimizing average waiting time but requires knowledge of future process execution times...
Which of the following sorting algorithms has the best average-case time complexity?
Output of below code
public class Prg {
public static void main(String args[]){
System.out.print("A" + "B" + 'A');
}
...What is the primary purpose of a digital signature in cryptography?
Which command is TCL command
The time complexity of computing the all-pairs shortest paths in a dense graph with V vertices using Floyd–Warshall is:
Which graph traversal technique is commonly used for topological sorting?
Which shortest-path algorithm is appropriate for graphs with non-negative weights and supports decrease-key efficiently for faster performance?
Depth-First Search (DFS) typically uses which data structure implicitly or explicitly?
What is the worst-case time complexity of Bubble Sort?