Join TSR now and get all your career questions answeredSign up now

# Interview Question: Square Root of 123456. Watch

1. If you were asked this at an interview how would you tackle it given just a pen and paper. (No Calculator im afraid lol)
2. 300 squared is 90,000; 400 squared is 160,000; so about 340 or 350? How accurate do you have to be and how much time do you have?

I'm sure there is an elaborate way of getting to the answer in 3 seconds but that's how i'd go about it
3. Well it's going to end in 6 (I think) and as salmon says will begin with 3.
So that narrows it down to ten options, assuming an integer solution.

Just checked, it's not an integer solution so disregard this.
(It's a little over 351 and a third)
4. roughly like this: it's the square root of 1234.56 * 100, so it's 10 times root of 1234.56. which in turn is root of 100 * 12.3456, so 10 times root of 12.3456. so it's 100 times root of 12.3456, root of 12.3456 is root of 4 times c. 3, so it's 200 times root of c. 3, approximate root of 3 as 1.732 (using birth of George Washington as the rule of thumb), so you get 200 * c. 1.8, = 200 + 160 = c. 360

pretty close?
5. (Original post by Jamil1987)
If you were asked this at an interview how would you tackle it given just a pen and paper. (No Calculator im afraid lol)
Yeah probably as teenage pirate did, or simple interval bisection will cause you to guess 350. When you try that you'll get pretty damn close (I imagine they set it up to be fairly close to an obvious number).
6. (Original post by Jamil1987)
If you were asked this at an interview how would you tackle it given just a pen and paper. (No Calculator im afraid lol)
I'd politely make my excuses and leave.
7. use Teenage Pirate's break down of:
square root of 123456= 100 x square root of 12.3456

1. then make a guess at the square root of 12.3456:
should be between 3 and 4 because 3x3=9 and 4x4=16
make a guess of 3.5

2. Divide 12.3456 by 3.5
that answer = 3.5273

3. find the average of 3.5 and 3.5273
(3.5+3.5273)/2 = 3.51365

To get more accurate, let 3.51365 be your new guess and do steps 2 and 3 again.

Checking the answer so far: 3.51365 x 3.51365 = 12.3457 ....which is pretty close already

But don't forget that you want square root of 123456 = 100 x square root of 12.3456
=100 x 3.51365 = 351.365

This method of finding the square root without a calculator is called the Babylonian method.
Where I learned it and a little better explanation and formula is here square root without calculator

It's still a bit tedious without a calculator though...that is for sure.
8. Other options include approximating the solution to the relevant Pell equation, or using generalised continued fractions.
9. Is this for an IB position? Perhaps the appropriate response should be along the lines of; "I don't deal in numbers that small, sorry."
10. (Original post by M1011)
Is this for an IB position? Perhaps the appropriate response should be along the lines of; "I don't deal in numbers that small, sorry."
lol, this particular question was IB Tech @ Nomura
11. (Original post by Mize)
2. Divide 12.3456 by 3.5
that answer = 3.5273.
Woah woah, so how did you manage this without trouble
12. (Original post by Jamil1987)
lol, this particular question was IB Tech @ Nomura
I don't really understand the need in such a question. No ones ever going to need to randomly approximate a difficult calculation. It takes longer to work it out than to get your phone out and click calculator

I guess it somewhat shows critical thinking if you'd never done this kind of thing before, but if you had it seems completely useless/unfair on the people who hadn't.
13. How long did you have. It took me 1min to get it through trial and error.
did 500x500, too big
400x400, too big
300x300, too small
350x350, about right.
351x351, close enough
14. (Original post by uxa595)
How long did you have. It took me 1min to get it through trial and error.
did 500x500, too big
400x400, too big
300x300, too small
350x350, about right.
351x351, close enough
Although that's how most people would do it, your method isn't algorithmic.

When you get to 350^2 and see that this is too small, so the square root lies in the interval (350,400). A bisection method would go to 375, not 350. The only reason you go to 351 is because |350^2 - 123456| << |400^2 - 123456| so you know the square root is going to be much closer to 350 than it is to 400. Putting this into an algorithm is a trickier (requires a fair amount of pen and paper work at least) than a bisection method, but it's a lot faster. I suppose this is the crux of the question, and is why they've asked it.

Although it could be that they just want to see the candidate they are interviewing can multiply.
15. Do they ask these types of maths questions at IB interviews? :O
I always thought they were about yourself etc and why you want to work for company etc not actual maths questions?
16. I did not see the 'pen and paper' comment so that's how I did it in my mind:
300^2 = 90,000
400^2 = 160,000
so it's between 300 and 400
I know by heart that 35^2 = 1225 and 36^2 = 1296. 1296 - 1225 ¬ 70, 360-350=10, so for an increase of ¬10 (from 1225 to 1235) we should go up by 10/70*10 ¬ 1.4, so it's 351,4 which is as close as I could get.
On an interview, however, I'd just say 350 in about 10 seconds. I believe they will be more impressed that I know 35^2 by heart and can answer the question quickly than if I take like a minute to solve it on the paper and give them a more precise answer.
17. (Original post by miml)
When you get to 350^2 and see that this is too small, so the square root lies in the interval (350,400). A bisection method would go to 375, not 350. The only reason you go to 351 is because |350^2 - 123456| << |400^2 - 123456| so you know the square root is going to be much closer to 350 than it is to 400. Putting this into an algorithm is a trickier (requires a fair amount of pen and paper work at least) than a bisection method, but it's a lot faster. I suppose this is the crux of the question, and is why they've asked it..
If you wanted to be efficient then you wouldnt use bisection, you'd interpolate between the values since you know its monotonic increasing, then pick your next guess based on that. A linear interpolation is going to be inefficient (since the square function is nowhere near linear) but its still a lot better than a bisection. If you linearly interpolate between 350^2 = 122500 and 400^2 = 160000, then your next guess for x^2 = 123456 is going to be much closer to 350 than to 400.
18. But for me, it took longer (more math steps) to do by linear interpolation than by the babylonian method.
Would be interesting to know the percentage of people that were able to come up with a good answer...say within 5 minutes.
If I were the interviewer, I would ask how would you go about finding the answer....and listen....to see how their brain works. If they already knew a set way to do it, I would have a backup question.

Write a reply… Reply
Submit reply
Updated: May 23, 2012
TSR Support Team

We have a brilliant team of more than 60 Support Team members looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

This forum is supported by:
Today on TSR

### HELP!

Mum wants to come to Freshers

Poll
Useful resources

## Articles:

Guide to investment bankingGuide to consultancy

## Featured recruiter profiles:

### Deutsche Bank is recruiting

"Thrive in an international banking environment"

## Quick link:

Unanswered investment banking and consultancy threads

## Groups associated with this forum:

View associated groups
Study resources

The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.