-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lecture "Brute-force algorithms", exercise 5 #19
Comments
|
I was a little stuck and @Hizkie's answer was very helpful. I did not see the need for enumerating the original list, and it worked with doing so. But I can definitely see how doing so is "safer" because it introduces the constraint that Hizkiel defined as " if(position>=0): ".
|
Thanks to @delfimpandiani for suggesting me to use "input_list[new_position]"!
|
|
|
|
thanks @delfimpandiani for taking time adding code's explanation
|
|
|
Hi all, here my take on the exercise (available also as Python file in the GitHub repository), with some comments:
Some comments:
|
Write in Python the function
def my_reversed(input_list)
which behave like the built-in functionreversed()
introduced in Section "Insertion sort" and returns a proper list, and accompany the function with the related test case. It is not possible to use the built-in functionreversed()
in the implementation.The text was updated successfully, but these errors were encountered: