# Puzzle 13) Roshan and his Number

Submitted by Amit Shukla, on August 10, 2017

**Puzzle**

Roshan have a favorite number and he give some information regarding his number. The information is that the sum of square of the digits constituting a positive two- digit number is 13. If we subtract 9 from that number, we shall get the number written by the same digit in reverse order. Now you have to find Roshan’s favorite number.

**Important points of puzzle:**

- Sum of square of the digits of a two- digit number is 13.
- On subtracting 9 from that number.
- We get a number written by same digit.
- In reverse order.
- Now find that number.

**Answer**

**32.**

**Reason**

For sum of square of digits to be 13, it is obvious that the digits should be 2 and 3. So the number can be only 23 or 32. Further, the number being referred to 32 since the reduction of 9 reverse the digit. Hence the required number is 32.

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.