summaryrefslogtreecommitdiff
path: root/introductory_problems/readme.md
diff options
context:
space:
mode:
Diffstat (limited to 'introductory_problems/readme.md')
-rw-r--r--introductory_problems/readme.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/introductory_problems/readme.md b/introductory_problems/readme.md
index 1ff88eb..d276f99 100644
--- a/introductory_problems/readme.md
+++ b/introductory_problems/readme.md
@@ -6,3 +6,10 @@ Consider an algorithm that takes as input a positive integer `n`. If `n` is even
**Input**: The only input line contains an integer `n`. (Example: 3)
**Output**: Print a line that contains all values of `n` during the algorithm. (Example: 3 10 5 16 8 4 2 1)
+
+### Missing Number
+You are given all numbers between `1, 2, ..., n` except one. Your task is to find the missing number.
+
+**Input**: The first input line contains an integer `n`. The second input line contains `n - 1` numbers. Each number is distinct and between 1 and `n` (inclusive). (Example: 5`\n`2 3 1 5)
+
+**Output**: Print the missing number. (Example: 4)