Problem (High — crash on valid input 1)
math/Collatz-Conjecture/Collatz-Conjecture.py:26 — the cache branch does yield from get_remaining_sequence(start), but that helper yields the sequence after start and never start itself. Input 1 is always in steps_cache ({1: 0}), so the generator yields nothing, and first = next(gen) at line 95 raises an uncaught StopIteration and the program crashes. 1 passes every input guard, so it's valid.
Separately, a number reused within a session (e.g. 6 then 3) prints a sequence missing its starting term and an off-by-one step count.
Suggested fix (tiny)
In the cache branch, yield start before yield from get_remaining_sequence(start).
Would love to fix under GSSoC '26.
Problem (High — crash on valid input
1)math/Collatz-Conjecture/Collatz-Conjecture.py:26— the cache branch doesyield from get_remaining_sequence(start), but that helper yields the sequence afterstartand neverstartitself. Input1is always insteps_cache({1: 0}), so the generator yields nothing, andfirst = next(gen)at line 95 raises an uncaughtStopIterationand the program crashes.1passes every input guard, so it's valid.Separately, a number reused within a session (e.g.
6then3) prints a sequence missing its starting term and an off-by-one step count.Suggested fix (tiny)
In the cache branch,
yield startbeforeyield from get_remaining_sequence(start).Would love to fix under GSSoC '26.