Refresh to get another 5 random questions

Cut and Shuffle (A Programming Problem of NexTag)

A Programming Problem of NexTag

Given a deck of nCards unique cards, cut the deck iCut
cards from top and perform a perfect shuffle. A perfect
shuffle begins ...

Warden and prisoners

The warden meets with 23 new prisoners when they arrive. He tells them, "You
may meet today and plan a strategy. But after today, you will be in isolated
cells ...

Tags: puzzle

100 prisoners in a jail

There are 100 prisoners in a jail. Since the jail will be closed, the prisoners are either released or executed. They are lined up in a single line in the ...

The shortest path from N to 1

Given an integer N, update it iteratively as follows:
(1) if N is odd, N++ or N--
(2) if N is even, N/=2
Find the shortest path to reduce N ...

The total number of squares on a chessboard

Determine the total number of squares of all sizes and positions on an ordinary 8x8 chessboard. Also compute the total number of rectangles.