# searching medium

Find the Missing Seat Number

The bus seats are numbered in order, but one number is skipped — that's where the ghost sits. 👻

You get the seat numbers in increasing order, going up by 1 each time except for a single gap. Print the missing number.

Example:

Input: nums = [4, 5, 6, 8, 9] Output: 7

Every neighbor jumps by exactly 1 except 6 → 8, a jump of 2 — so the missing seat is 6 + 1 = 7.

💡 need a hint?

srch-missing-seat-number.py🔒 given lines are locked — write your code in between
loading...