# Puzzle 26) Bikes and Distance

Submitted by Amit Shukla, on September 29, 2017

**Puzzle**

The distance between two stations **X** and **Y** is 230 kilometers. Two bikes start simultaneously from **X** and **Y** respectively, towards each other and the distance between them after 3 hours is 20 km. If the speed of one bike is less than that of the other by 10 km/hour, now your task is to find out the speed of slower bike.

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

- Distance between stations id 230 km.
- Two bikes start at the same time from opposite ends.
- Bikes were moving towards each other.
- Distance between them after 3 hours is 20 km.
- If speed of one bike is less than other by 10 km/hour.
- Find out the speed of slower bike.

**Answer**

**30 km/hour**

**Reason**

In three hours the two bikes cover 210 km. Hence, the sum of speeds must be 70 km/hour and the slower bike’s speed would be 30 km/hour.

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

**Ad:**
Are you a blogger? Join our Blogging forum.