# Software Engineer Interview Questions

Software engineer interview questions shared by candidates

## Top Interview Questions

Suppose that you earn 100% annual interest (APY) on $1 initial deposit. How long before you'll be as rich as Bill Gates ($63 billion)? Given a number, e.g., 314159, as an array [3,1,4,1,5,9], increment it: change it to [3,1,4,1,6,0]. Taking just the information we are given and ignoring taxes etc. 100% annual (compound) interest is the same as doubling your investment every year. So for the first four years it would go like this: $1, $2, $4, $8, $16, $32, ... Look familiar? Therefore: 63 Billion = 2^x or x = log2(63 billion) In an interview we wouldn't be able to throw this into a calculator so we would need to do it by hand. We can estimate powers of 2 as powers of 1000: 2^10 ~= 1000^1 2^20 ~= 1000^2 etc. Therefore 63 billion = 63 * 1000^3 or approximately = 63 * 2^30 We know that 64 is 2^6 so we can substitute that with the 63 to get: 2^6 * 2^30 which = 2^36 log2 of 2^36 is 36 Therefore you would have $63 billion after 36 years. Now if we validate with the calculator we see that after 36 years we would actually have about $68/$69 billion. While if we only waited until 35 years we would only have $34 billion. @Sam That's not actually correct as you have not considered the first year where money increases from $1 to $2, so the correct answer is 37 years... It toke ^ 10 to for 2 to reach 1k. So it will take ^ 30 to reach 1b. Then u need another ^ 6 to just pass 63b. S the answer is 36 years. Show more responses |

Quickly estimate 2^64 without using a pen/papar. |

You have a 64bit interger counter set to 0. How long it will take to overflow the counter given that you are incrementing it at 4Ghz speed. |

How to implement a queue simply using two stacks and how to implement a highly efficient queue using two stacks. |

How to add a counter to www.google.com to track the billionth user. |

Calculating the max execution time of a program that had to fit into a certain size of memory on an embedded device. |

how many golf balls could you fit into that building? |

C++ versus Java. Reverse a singly lined list. |

How long will it take for an unsigned 64 bit counter to overflow on a xxx ghz machine and another coding problem that requires recursive programming. |

1. You are asked to guess a random integer number between 0 and 999. 2. You are allowed to ask “Yes/No” questions about the number. 3. Can you determine the number with 10 questions? |

**1**–

**10**of

**531**Interview Questions

## See Interview Questions for Similar Jobs

- Senior Software Engineer
- Software Developer
- Java Developer
- Senior Software Developer
- Developer
- Engineer
- Senior Java Developer
- Analyst
- Project Manager
- Business Analyst
- Product Manager
- Senior Developer