# Puzzle 10) Himanshu and its four- Digit Number

Submitted by Amit Shukla, on August 09, 2017

**Puzzle**

Himanshu is interested in solving logical and mathematical problems. One day he got a problem in which he has to find out the greatest number of four digits that when the number is divided by any of the numbers 6, 9, 12, 17 leaves a reminder 1. Now himanshu needs your help to find the greatest four- digit number which satisfy above condition.

**Important points of puzzle:**

- Himanshu got a problem in which he has to find out the greatest four- digit number.
- There is a condition that when the number is divided by 6, 9, 12, 17 it eaves reminder 1.
- Now you have to find out the greatest four- digit numberwhich satisfies the above condition.

**Answer**

The correct answer is 9793.

**Reason**

The lowest common multiple (LCM) of the four numbers 6, 9, 12, and 17 is 612. The highest four- digits number which would be a common multiple of all these four numbers is 9793. Hence, the correct answer is 9793.

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.