Question
A train leaves Meerut at 5 a.m. and reaches Delhi at 9
a.m. Another train leaves Delhi at 7 a.m. and reaches Meerut at 10:30 a.m. At what time do the two trains cross each other?Solution
Train 1 travel time = 4 hours Train 2 travel time is 3.5 = 7/2 hours We know, speed = Distance/time Let the distance b/w Meerut & Delhi is 28 Km (LCM of 4 & 7/2) Speed of 1st train = 28/4 = 7 km/h Speed of 2nd train = 28/3.5 = 8 km/h Relative speed = Train 1 speed + Train 2 speed ⇒ Relative speed = 7 + 8 = 15 km Train 1 travels for 2 hours before train 2 starts. Remaining distance = 28 - 28/2 = 14 km Time is taken to cross each other Time = 14/15 hours or 56 minutes. Total time taken = 2 hours + 56 minutes ∴ They cross each other at 7 : 56 a.m.
What is false about linked list?
Which layer of the TCP/IP model is responsible for IP addressing and routing?
Which hazard occurs when there is a conflict in accessing a shared resource, such as a register file or an ALU, in an instruction pipeline?
Which consensus mechanism is used by Bitcoin, the first blockchain-based cryptocurrency?
In dynamic programming, what does "optimal substructure" mean?
What is a "token" in lexical analysis?
Which sorting algorithm is known for its best-case time complexity of O(n) when the input is already partially sorted?
Which data visualization technique is commonly used to represent the frequency distribution of a large dataset?
An XML document is a string of ____.
Which of the following algorithm is most sensitive to outliers?