# Puzzle 25) Bus and its speed

Submitted by Amit Shukla, on September 25, 2017

**Puzzle**

A bus after travelling 50 km from A faces an accident and proceeds at 4/5th of the initial speed and reaches its destination 45 minutes late. Had the accident happened 20 km. further, it would have arrived 12 min. sooner. Find the original speed and the distance of the bus.

**Important points of puzzle (Key points):**

- A Bus is travelling 50 km from A.
- It faces an accident and proceeds at 4/5th of the initial speed
- It reaches its destination 45 minutes later.
- If accident happen 20 km it would arrive 12 minutes sooner.
- Find original speed and distance of the bus.

**Answer**

The original speed of the bus is 25 km/hour and its distance is 125 kilometers.

**Reason**

Let the speed be x km/hour.

When the bus travels with its usual speed throughout, it reaches 45 minutes earlier than after reducing the speed to 4/5th after 50 kilometers.

When the bus travels with its usual speed throughout, it reaches 33 (45 – 12) minutes earlier than after reducing the speed to 4/5th after 70 kilometers.

When the speed becomes 4/5th of the usual, time taken would become 5/4th the usual, i.e. 1/4th more of the usual time.

So, 1/4th of the usual time taken to travel CB = 45min.

1/4th of the usual time taken to travel CD (i.e. 20 km) = 12 min.

Usual time to travel 20 km. = 48 min.

Usual Speed = 20 * 60/48 = 25 km/hours.

Usual time taken to travel CB = 45 * 4 = 3 hours.

Distance CB = 25 * 3 = 75 km.

Total distance = 50 + 75 = 125 km.

Hence the correct answer is 25 kilometers/hour and 25 kilometers.

TOP Interview Coding Problems/Challenges

- Run-length encoding (find/print frequency of letters in a string)
- Sort an array of 0's, 1's and 2's in linear time complexity
- Checking Anagrams (check whether two string is anagrams or not)
- Relative sorting algorithm
- Finding subarray with given sum
- Find the level in a binary tree with given sum K
- Check whether a Binary Tree is BST (Binary Search Tree) or not
- 1[0]1 Pattern Count
- Capitalize first and last letter of each word in a line
- Print vertical sum of a binary tree
- Print Boundary Sum of a Binary Tree
- Reverse a single linked list
- Greedy Strategy to solve major algorithm problems
- Job sequencing problem
- Root to leaf Path Sum
- Exit Point in a Matrix
- Find length of loop in a linked list
- Toppers of Class
- Print All Nodes that don't have Sibling
- Transform to Sum Tree
- Shortest Source to Destination Path

Comments and Discussions