I came across another interesting coding problem on Codility and wanted to share my learnings.
Find the smallest positive integer (>0) not occurring in a given sequence. Link to the full problem (Lesson 4 — Counting Elements).
Solution in Python
I’ve scored 100% for this solution
num_set = set(A)
min_num = 1
while min_num in num_set:
return min_num#testcase1, expect 5…