Question
Two trains depart from the same station. The first train
departs at 8:00 A.M., traveling at a speed of 60 km/h. Two hours later, at 10:00 A.M., the second train leaves the station, traveling at a faster speed of 72 km/h. At what time will the second train catch up to the first train?Solution
We can see that the first train leaves 2 hours before the second train. So, distance travelled in 2 hours by the first train = 2 X 60 = 120 km So, time taken by the two trains to meet = 120 Γ· (72 - 60) = 10 hours So, the second train will meet the first train at 10:00 AM + 10 hours = 8:00 P.M.
Which tree traversal gives nodes in non-decreasing order for a BST?
In a data warehousing environment, what is the primary purpose of an OLAP (Online Analytical Processing) cube?
In a binary tree, what is the maximum number of children a node can have?
Which sorting algorithm has O(n log n) average case?
Which of the following data structures is best suited for implementing a "undo" mechanism in a text editor?
Which of the following best describes Abstraction in Object-Oriented Programming (OOP)?
What does Big O notation primarily describe?
A stack follows which principle for data access?
Which data structure uses LIFO (Last In, First Out) principle?
What is the difference between 'BFS' (Breadth-First Search) and 'DFS' (Depth-First Search) in graph traversal?