Programming Interview Questions | Glassdoor

Programming Interview Questions

6,020

interview questions shared by candidates

Programming Interview Questions

Sort: RelevancePopular Date

You have a 100 coins laying flat on a table, each with a head side and a tail side. 10 of them are heads up, 90 are tails up. You can't feel, see or in any other way find out which side is up. Split the coins into two piles such that there are the same number of heads in each pile.

36 Answers

Answer #1: Place 50 coins into two piles on its edges so that both have the same amount of heads in each pile, neither facing up or down. Answer #2: Trick question, place 50 coins in both piles and in theory they all have heads just not necessarily facing up or down.

agree with 2nd ans

Split into two piles, one with 90 coins and the other with 10. Flip over every coin in the pile with 10 coins.

One or more comments have been removed.
Please see our Community Guidelines or Terms of Service for more information.

An array of 99 elements contains integers from 1 to 100 with one missing element. Find the missing element.

127 Answers

Write some pseudo code to raise a number to a power.

11 Answers

Suppose you have a matrix of numbers. How can you easily compute the sum of any rectangle (i.e. a range [row_start, row_end, col_start, col_end]) of those numbers? How would you code this?

8 Answers

Write code in your favorite programming language that will accept two strings and return true if they are anagrams.

2 Answers

What's an API?

1 Answer

Out of 25 horses, pick the fastest 3 horses. In each race, only 5 horses can run at the same time. What is the minimum number of races required?

68 Answers

If I gave you $40,000 to start a business what would you start

132 Answers

Devise a way to make sure there is always mlik in my fridge.

33 Answers
110 of 6,020 Interview Questions