Image for post
Image for post
Photo by travelnow.or.crylater on Unsplash

A brief tutorial on the square root of two calculation and digit counting in hexadecimal base.

Recently our software development team recruited a new team member and we had to concoct a home exam in order to filter out less than suitable candidates. Oddly enough, none of our candidates passed the test. Therefore, we wanted to share our test as a short tutorial for the benefit of the community.

The original question reads as follows: ”Regarding sqrt(2), when written in decimal form 1 occurs 99925 times in the first 1 million digits. how many times does the digit 2 occur in the first 1 million hexadecimal digits?

Such as most other things in life this question…

Ben shavit

Software engineer and math enthusiast

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store