This commit is contained in:
Mia von Steinkirch 2019-05-12 18:00:11 -07:00
parent fa83f7e42a
commit 0d5e21b867
9 changed files with 148 additions and 2 deletions
interview_cake

View file

@ -1,5 +1,9 @@
# Write a function that takes a list of characters and reverses the letters in place.
# O(n) time and O(1)O(1) space.
#!/usr/bin/env python
"""
Write a function that takes a list of characters and reverses the letters in place.
O(n) time and O(1)O(1) space.
"""
def reverse_in_place(char_list):
return char_list[::-1]