Skip to content

Instantly share code, notes, and snippets.

@Cijin
Created May 27, 2022 15:35
Show Gist options
  • Save Cijin/464e8fd56a18a647743ee3050932e1b0 to your computer and use it in GitHub Desktop.
Save Cijin/464e8fd56a18a647743ee3050932e1b0 to your computer and use it in GitHub Desktop.
The Hand Shake Problem

The HandShake Problem

The Back Story

It's no ground breaking finding but an intersting one none the less. Was watching a movie based on a true story, one of my favorite things I took away from it was this; There was a challenging task in front of the kids in the movie, they had to do 12 months of learning in 8. So the teacher says, make life your problem, ask questions solve them, and ask questions of questions.

Now although the problem was aimed at teaching Maths, Science etc. I am a programmer so why not use the same ideology to improve coding skills. So here is one of them.

The Problem

If there are 30 people and each of the shakes each others hand, how many handshakes happen in total. Here is my solution, feel free to share yours with me.

I would recommed the movie too, it's amazing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment