Following is the list of commonly asked programming puzzles in technical interviews:
- Clock Angle ProblemEasy
- Add two numbers without using the addition operatorEasy
- Implement power function without using multiplication and division operatorsEasy
- Print all numbers between 1 to N without using a semicolonMedium
- Swap two numbers without using a third variableEasy
- Determine the if condition to print the specific outputEasy
- Find maximum and minimum value of a triplet without using a conditional statementMedium
- Find numbers represented as the sum of two cubes for two different pairsMedium
- Print “Hello World” with empty main functionMedium
- Print all numbers between 1 to N without using any loopEasy
- Print a semicolon without using a semicolon anywhere in the programEasy
- Multiply two numbers without using a multiplication operator or loopsEasy
- Find the square of a number without using the multiplication and division operatorEasy
- Check if a number is even or odd without using any conditional statementEasy
- Set both elements of a binary array to 0 in a single lineEasy
- Find minimum number without using conditional statement or ternary operatorMedium
- Perform division of two numbers without using division operatorMedium
- Generate 0 and 1 with 75% and 25% probabilityMedium
- Generate desired random numbers with equal probabilityMedium
- Return 0, 1, and 2 with equal probability using a specified functionMedium
- Generate fair results from a biased coinHard
- Generate numbers from 1 to 7 with equal probability using a specified functionHard
- Implement ternary operator without using conditional expressionsMedium
- Determine if two integers are equal without using comparison and arithmetic operatorsEasy
- Get 0 and 1 with equal probability using a specified functionMedium
Thanks for reading.
To share your code in the comments, please use our online compiler that supports C, C++, Java, Python, JavaScript, C#, PHP, and many more popular programming languages.
Like us? Refer us to your friends and support our growth. Happy coding :)