add recursive soln.
This commit is contained in:
4
03_recursion/python/04_count.py
Normal file
4
03_recursion/python/04_count.py
Normal file
@@ -0,0 +1,4 @@
|
||||
def count(arr):
|
||||
if not arr:
|
||||
return 0
|
||||
return 1 + count(arr[1:])
|
||||
Reference in New Issue
Block a user