aboutsummaryrefslogtreecommitdiff
path: root/challenge-201
diff options
context:
space:
mode:
authorLubos Kolouch <lubos@kolouch.net>2023-02-14 11:02:32 +0100
committerLubos Kolouch <lubos@kolouch.net>2023-02-20 20:24:52 +0100
commit0b0afd9eb7890646aff2c1b5b0a0db87e02dc180 (patch)
tree6ae1a89c33700629f4a6d544773f6b98bd3fcd2f /challenge-201
parente98fa50d9dd47dd02ce01b6db838fd05ec0e1a97 (diff)
downloadperlweeklychallenge-club-0b0afd9eb7890646aff2c1b5b0a0db87e02dc180.tar.gz
perlweeklychallenge-club-0b0afd9eb7890646aff2c1b5b0a0db87e02dc180.tar.bz2
perlweeklychallenge-club-0b0afd9eb7890646aff2c1b5b0a0db87e02dc180.zip
Challenge 201 Task1 LK Python
Diffstat (limited to 'challenge-201')
-rw-r--r--challenge-201/lubos-kolouch/python/ch-1.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/challenge-201/lubos-kolouch/python/ch-1.py b/challenge-201/lubos-kolouch/python/ch-1.py
index dc7229e912..4f638a4719 100644
--- a/challenge-201/lubos-kolouch/python/ch-1.py
+++ b/challenge-201/lubos-kolouch/python/ch-1.py
@@ -1,10 +1,18 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
+from typing import List
import unittest
-def find_missing_numbers(arr):
+def find_missing_numbers(arr: List[int]) -> List[int]:
+ """
+ Find all missing numbers in the range 0..n where n is the array size.
+ Args:
+ arr: A list of unique integers.
+ Returns:
+ A list of missing integers in the range 0..n where n is the array size.
+ """
n = len(arr)
s = set(arr)
missing_numbers = []