Cafeteria erroneous short circuit
Opened this issue · 0 comments
Grumpicus commented
Thanks for putting these up. I'm still trying to understand the O(n) solution but...
meta_coding_puzzles/cafeteria.py
Line 7 in ac3fcd7
I may be wrong but I believe the result incorrectly returns 0 for inputs of:
N = 14
K = 2
M = 4
S = [1, 4, 7, 10]
The answer should be 1 as either seat 13 or 14 is available.
Thanks again.