Senior Engineer Interview Questions |

Senior Engineer Interview Questions


Senior engineer interview questions shared by candidates

Top Interview Questions

Sort: RelevancePopular Date

Write a function that divides one number by another, without using the division operator, and make it better than O(n).

7 Answers

This can be done in a recursive function, the following code is in Python. # get result of a/b without using a "divide" operator def div(a,b): if a < b: return 0 else: return div(a-b, b)+1 This is how human being do the division naturally, however, the running time of this is O(n/m), where n is the size of a, and m is the size of b, which means, O(n/m) is guaranteed to be less than O(n), when m is larger than 1. -Maxim

The answer above is still O(n). We can use binary search and find the answer in the interval [1,a] and use multiplication operator.

Totally agree with Vasil. Other option: Long Division Algorithm. O(log n) anyway.

After asking the details of my current role, he only gave me a simple coding question. Write a function using C++ or Java that is passed an integer and it returns the number of bits set to 1. Is there a way to improve your solution and make it faster and more efficient?

3 Answers

find LCA for two nodes of a binary tree.

4 Answers

how to merge two sorted linklist?

2 Answers

Hackerrank question: valid braces segregate even and odd numbers

1 Answer

What would you say are you're biggest weaknesses if any?

2 Answers

Explain Asynchronous JS to us and what it means for a team working in a standard Node backend. What are your favorite products and why? (CEO will always ask this, I think it is the most important question he asks) What is the hardest thing you've ever done/what is your greatest accomplishment?

1 Answer

Build an email sign up form HTML/CSS/JS following a given spec. Include validation, proper colors, etc. make it look as close to the 'mock-up' as possible

1 Answer

siizof() of empty class

1 Answer

How NAT works?

1 Answer
110 of 533 Interview Questions