8000 Solution for task: Simple Fun #147: Find The Missing Tree. · ZaytsevNS/python_codewars@0306b96 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0306b96

Browse files
committed
Solution for task: Simple Fun #147: Find The Missing Tree.
1 parent 058ac72 commit 0306b96

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

7KYU/find_the_missing_tree.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Solution for task: https://www.codewars.com/kata/58aa8698ae929e1c830001c7/
2+
3+
from collections import Counter
4+
5+
6+
def find_the_missing_tree(trees: list) -> int:
7+
counter = Counter(trees)
8+
return min(counter, key=counter.get)

0 commit comments

Comments
 (0)
0