Senior Engineer Interview Questions in New York City, NY | Glassdoor

Find jobs for Senior Engineer

Senior Engineer Interview Questions in New York City, NY

1,112

Senior engineer interview questions shared by candidates

Top Interview Questions

Sort: RelevancePopular Date

How do you find 2 missing elements in an array of consecutive integers that are not sorted who's size is N-2.

7 Answers

hint sum (n) = n X (n+1)/2

One problem with that solution (sum) is that if the sum of numbers is of exorbitant size, you run a risk of overflow, given that there's no limit imposed on N. You can sort the array, but if you don't want modify the user's array, you'll need to make a copy...which depending on the size of the array, might be expensive. An alternative that I thought of would be to create a bitmap for each element (initializing all bits to 1). Then pass through the vector once and set the corresponding bit 0. After one pass through, you can make a second pass to determine which "sectors" still contain set bits and can extrapolate the missing value accordingly. Worst case O(2N) A strategy might be to impose one of the two methods, depending on the size of the array, but sorting inevitably has a floor of O(N), unless you're going to take a probabilistic guess and skip over elements you think might already be sorted. Most algorithms are O(n log n) because the need to visit every element, and the revisiting of some elements to perform the proper placement.

http://goldmansachs-is-fraud.blogspot.com/

find common numbers in 2 arrays of integer, try to use O(N).

3 Answers

What happens when a constructor fails. And then what happens when a distructor fails.

2 Answers

Explain how the garbage collector works.

2 Answers

Write an algorithm to determine if a string is a palindrome.

2 Answers

what did you work today in office

1 Answer

How do you install a PBX.

1 Answer

design a comment section database and design a trello ish app

1 Answer

What are DNS glue records?

1 Answer

What are some things to take note of when designing distributed services

1 Answer