Puzzle | Disclosing Secret

**Problem Statement:** A secret can be told only to 2 persons in 5 minutes. The same person tells to 2 more persons and so on. So How long will take to spread a secret to 768 persons?

**Solution:**

In the beginning, let only 1 person know the secret.

- Now, this 1 person will tell disclose the secret to 2 other persons in 5 mins.
**(Secret known = 2, Remaining = 766 persons)** - Now, this 2 person will tell disclose the secret to 4 other persons in 5 mins.
**(Secret known = 4, Remaining = 764 persons)** - Now, this 4 person will tell disclose the secret to 8 other persons in 5 mins.
**(Secret known = 8, Remaining = 760 persons)** - Now, this 8 person will tell disclose the secret to 16 other persons in 5 mins.
**(Secret known = 16, Remaining = 752 persons)** - Now, this 16 person will tell disclose the secret to 32 other persons in 5 mins.
**(Secret known = 32, Remaining = 736 persons)** - Now, this 32 person will tell disclose the secret to 64 other persons in 5 mins.
**(Secret known = 64, Remaining = 704 persons)** - Now, this 64 person will tell disclose the secret to 128 other persons in 5 mins.
**(Secret known = 128, Remaining = 640 persons)** - Now, this 128 person will tell disclose the secret to 256 other persons in 5 mins.
**(Secret known = 256, Remaining = 512 persons)** - Now, this 256 person will tell disclose the secret to 512 other persons in 5 mins.
**(Secret known = 512, Remaining = 256 persons)** - Now, as only 256 persons are left for the secret to being known, therefore, this 512 person will tell disclose the secret to only 1 person each i.e. 256 other persons in 2.5 mins.
**(Secret known = 768, Remaining = 0 persons)**

**Total time taken =** 9 * 5 + 1 * 2.5 = 47.5 mins

### Therefore, total time taken to disclose the secret to 768 persons = 47.5 minutes

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the **DSA Self Paced Course** at a student-friendly price and become industry ready.