Add some cool queue, stacks, strings, math, bit manipulation examples (#35)

This commit is contained in:
Dr. Marina Souza, PhD 2023-07-16 17:35:14 -07:00 committed by GitHub
parent f3ee2cdf52
commit 0f455a0322
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 932 additions and 13 deletions

View file

@ -0,0 +1,15 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# author: bt3gl
def reverse_array_in_place(array):
""" Reverse an array in place """
return array[::-1]
if __name__ == '__main__':
print('Testing reverse_array_in_place')
array = [1, 2, 3, 4, 5]
print(f'Array: {array}')
print(f'Reversed: {reverse_array_in_place(array)}')