Refresh to get another 5 random questions

Sum of Consecutive Prime Numbers

Some positive integers can be represented by a sum of one or more consecutive prime numbers. How many such representations does a given positive integer have? For example, the integer ...

A boat on a lake

You are in a boat on a lake and there is a suitcase in the boat. You throw this suitcase into the lake. What happens to the level of water ...

Cubic of integer

Let x be an integer between 1 and 10^12, what is the probability that the cubic of x ends with 11?

Tags: number

Consecutive heads

(1) A fair coin is tossed repeatedly until k consecutive heads occur. What is the expected number of times the coin is tossed?
(2) A fair coin is tossed n ...

Implement 3 stacks in a single array

How to implement 3 stacks in a single array as efficiently as possible ??