Tag Archives: Interview

Combinations of a String

Problem: Write an algorithm to print all possible combinations of characters in a string. Solution: Since we need to generate combinations, we can start with a single character and then continue to add a character to combinations we have seen … Continue reading

Posted in Interview Puzzles | Tagged , , , , , | 1 Comment

Gold for 7 Days of Work Puzzle

Problem Statement: You’ve got someone working for you for seven days and a gold bar to pay them. You must pay the worker for their work at the end of every day. If you are only allowed to make two … Continue reading

Posted in Interview Puzzles | Tagged , , | Leave a comment

Fastest 3 out of 25 Horses Problem

Problem Statement You have 25 horses, and you want to pick the fastest 3 horses out of those 25. Each race can have maximum of 5 horses at the same time. What is the minimum number of races required to … Continue reading

Posted in Interview Puzzles | Tagged , , | Leave a comment

100 floors with 2 eggs puzzle

Problem Statement: There is a building of 100 floors  If an egg drops from the Nth floor or above it will break. If it’s dropped from any floor below, it will not break. You’re given 2 eggs. Give an Algorithm to … Continue reading

Posted in Interview Puzzles | Tagged , , , | 1 Comment