mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-06-13 17:42:47 -04:00
bitwise
This commit is contained in:
parent
fa83f7e42a
commit
0d5e21b867
9 changed files with 148 additions and 2 deletions
interview_cake
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue