Top "Puzzle" questions

DO NOT USE - prefer constructive questions, or use more descriptive tags.

Overload a C++ function according to the return value

We all know that you can overload a function according to the parameters: int mul(int i, int j) { return …

c++ function puzzle overloading
Programming Riddle: How might you translate an Excel column name to a number?

I was recently asked in a job interview to resolve a programming puzzle that I thought it would be interesting …

algorithm puzzle
hello world in C without semicolons and without IF/WHILE/FOR statements

My friend says it's possible to write a C program that will print "hello world" without IF/WHILE/FOR and …

c puzzle
How to programmatically solve the 15 (moving numbers) puzzle?

all of you have probably seen the moving number/picture puzzle. The one where you have numbers from 1 to 15 in …

puzzle
Unique methods to generate sudoku puzzle

How many possible unique ways are there to generate a Sudoku Puzzle?? I can think of only two possible ways 1) …

algorithm puzzle sudoku
why is 24 * 60 * 60 * 1000 * 1000 divided by 24 * 60 * 60 * 1000 not equal to 1000 in Java?

why is 24 * 60 * 60 * 1000 * 1000 divided by 24 * 60 * 60 * 1000 not equal to 1000 in Java?

java puzzle math
SQL: how to get all the distinct characters in a column, across all rows

Is there an elegant way in SQL Server to find all the distinct characters in a single varchar(50) column, across …

sql sql-server string puzzle
Solving Puzzle in Python

I got one puzzle and I want to solve it using Python. Puzzle: A merchant has a 40 kg weight which …

python permutation combinations puzzle itertools
Compile time sizeof_array without using a macro

This is just something that has bothered me for the last couple of days, I don't think it's possible to …

c++ metaprogramming puzzle
Translating Morse code with no spaces

I have some Morse code that has lost the spaces in between the letters, my challenge is to find out …

puzzle morse-code