Tower of Hanoi Problem
The Tower of Hanoi is a mathematical puzzle consisting of three rods and n disks of different sizes which can slide onto any rod.
Ace your Coding Interview
Get hired by top tech companies with our comprehensive interview preparation.
Get StartedThe Tower of Hanoi is a mathematical puzzle consisting of three rods and n disks of different sizes which can slide onto any rod.
Write a program to print “Hello World” with an empty main function, i.e., without writing anything inside the main() function.
Given a large number, n, find all positive numbers less than n that can be represented as the sum of two cubes for at least two different pairs.
Given three integers, find the maximum and minimum number between them without using conditional statements or ternary operator.
What should be the if condition in the following code snippet so that output would be “Hello World”.
Given two integers, swap them without using any third variable.
Write a program to print all numbers between 1 and n without using a semicolon.
Given two positive integers, implement the power function without using multiplication and division operators.
Given two numbers, add them without using an addition operator.
Clock Angle Problem: Given time in hh:mm format, calculate the shorter angle between the hour and minute hand in an analog clock.