Skip to content

Instantly share code, notes, and snippets.

@felipesilva
Created September 9, 2015 17:12
Show Gist options
  • Save felipesilva/3e517ec5827a59753e47 to your computer and use it in GitHub Desktop.
Save felipesilva/3e517ec5827a59753e47 to your computer and use it in GitHub Desktop.
Missing Number
Given an array containing all numbers from 1 to N with the exception of one print the missing number to the standard output.
Example input:
array: 5 4 1 2
Example output:
3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment