GoDaddy Interview Question for Software Engineer / Developers


Country: United States
Interview Type: Phone Interview




Comment hidden because of low score. Click to expand.
6
of 6 vote

if we fill first 4 locations with any of 7 numbers {0,1,2,5,6,8,9}. Rest of the 4 locations in a valid number will be filled by(in corrosponding digit) {0,1,2,5,9,8,6}. Hence, total number of valid 8 digits numbers 7^4/10^8.

- curious March 05, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

we can't use 0 as first digit as it wont appear in Calculator and we it will become 7 digit number if we use 0!!
so in my opinion answer should be = 6*7^3 / 9*10^7

- ashutosh141 March 05, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

That's about right, but as ashutosh141 noted, we might have to modify the formula a bit if leading 0s aren't allowed. We also have to ask whether 6s really look like 9s upside down (in some fonts they do; in others they don't). Of course some of the other digits might not look the same upside down either (do 2s or 5s, for example? Not in the font I'm using now).

- eugene.yarovoi March 06, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

I don't know about your pocket calculator, but mine doesn't have fonts

- GH September 13, 2013 | Flag
Comment hidden because of low score. Click to expand.
3
of 3 vote

Out of 10 digits, we have only 3 digits which look the same as they are upside down.
So, for 1 digit number, probability of getting a digit which will look same after flipping it upside down is = 3/10
Now, for n digits we have n independent events:
so the total probability for n digits:
P = (3/10)^n

For n = 2, P = (3*3)/(10*10) = 3/50 = 0.06

Correct me if I'm wrong.

- HauntedGhost March 04, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

You're ignoring the fact that the number has to be a palindrome.
The answer is (3/10)^n/2 (1/10)^n/2

- Anonymous March 05, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

It's not the number of digits that look the same upside down that's important, it's the number of digits that look like some digit (itself or some other digit) when upside down. This number really depends on the font being used. If there are k such digits (and k is even), the formula will be k^(n/2) / 10^n (as anonymous already suggested).

- eugene.yarovoi March 06, 2013 | Flag
Comment hidden because of low score. Click to expand.
1
of 1 vote

Condition for digit combination to appear same when inverted :
a) for every 6 at distance x from left there must be a 9 at distance x from right and vice versa. [ x < 4 ]
b) rest of the digits should be 0,1 or 8.
Now solve it case by case i.e using 0 time 6 and 9, 1 time 6 and 9, two times 6 and 9 ....

//Following is INCORRECT Approach
Number must be formed by 0,1,8 to look same on both sides.
=> Total number of 8 digit combinations possible using 0,1,8 = 3^8
=> Total number of 8 digit combinations = 10^8

Answer = (3^8)/ (10^8)

- Cerberuz March 04, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

6 and 9, too

6009 is 6009 upside down

- Frank March 04, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Ok, but 619 != 916
=>6 and 9 both should be at same distance from beginning and end and we have to use them same number of times.

So this is actually not that easy ;), just need to handle it case by case i.e. 6 and 9 appears :
0 time
1 time
2 times
3 times ...

- Cerberuz March 04, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

How come 6009 upside down is 6009? :P
I think it is 9006!

- HauntedGhost March 04, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Digits will be read from left to right, on turning upside down right will become left + 6 will become 9, 9 will become 6.

- Cerberuz March 04, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

a) case where 6/9 appear only once in first four digits: 2*3^6*4
b) case where 6/9 appear two times in first four digits: 2^2*3^4*6
c) case where 6/9 appear 3 times in first four digits: 2^3*3^2*4
d) case where 6/9 appear 4 times in first four digits: 2^4

sum of (a, b, c, d)/ 10^6

- Anonymous March 04, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

a) case where 6/9 appear only once in first four digits: 2*3^6*4
b) case where 6/9 appear two times in first four digits: 2^2*3^4*6
c) case where 6/9 appear 3 times in first four digits: 2^3*3^2*4
d) case where 6/9 appear 4 times in first four digits: 2^4
e) case where 6/9 donot appear : 3^8

sum of (a, b, c, d, e)/ 10^6

- Anonymous March 04, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Generalized formula:
summation(k -> 0 - 4) {4Ck * 2^k * 3^(4-k)}

- Anonymous March 04, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

_ _ _ _ | _ _ _ _

first spot can take values 1,6,8,9
2nd, 3rd,4th spot can take values 0,1,6,8,9

if any spot takes a 6 or 9, the corresponding spot from back will take 9 or 6 respectively.

therefore ans is
4/9 * 5/10 * 5/10 * 5/10 * 1 * 1 * 1 * 1 = 1/18

- vishesh nagpal August 29, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Your numerator is perfectly correct,but the denominator for the remaining four digits can be anything so according to me it should be...... 4/9 * 5/10 * 5/10 * 5/10 * 1/10 * 1/10 * 1/10 * 1/10

- shreyas November 01, 2015 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

1, 2, 5, 8, 0 look the same when reversed (old digital calculator).
First number cannot be 0.
First 4 digits are the only ones with choice. Number has to be palindrome.
So 4/9 * 5/10 * 5/10 * 5/10 = answer.

- Henry David Thoreau March 28, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

number has to be palindrome. 0 can't be used at first place.
Using 1,2,5,8 at first place and 0,1,2,5,8 at any other places, we have our interested space as num= 4*5*5*5. Our total space is den= 9*(10^7).
Hence, answer = (num/den)
P.S: the number has to look exactly alike, as in have same value.

- nharryp April 02, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

1. the number has to be a palindrome,
2. candidate numbers for each digit is 0, 1, 6, 9, 8
3. since the number needs to be palindromic, we only need to determine the first 4 digits
4. 0 can't be the most significant digit
So the answer is 4 * 5^3 / 9 * 10^7

- Cloud_cal October 02, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

1/ 10^8

- dianadijan May 07, 2015 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More