Skip to content
Dev.to1 min read

Performance & Recursion

How can you count all the participants in an auditorium if you don't have sensors, check-in processes or access control? Option 1: Use my eyes and my mind to count them one by one: 1,2,3,4... Option 2: Count by twos, like 2,4,6,8,... Option 3: Ask the participants to follow these instructions: Stand up and think of the number 1 Pair off with someone standing, add their number to yours, and remember the sum One of you should then sit down If still standing, go back to step 2. The final person sta
Read original on dev.to
0
0

Comment

Sign in to join the discussion.

Loading comments…

Related

Get the 10 best reads every Sunday

Curated by AI, voted by readers. Free forever.

Liked this? Start your own feed.

0
0