-
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 2 #16
Comments
|
|
|
#Test case for the algorithm def test_stack_from_list(input_list, expected):
from collections import deque def stack_from_list(input_list):
print(test_stack_from_list([“Part 1", “Part 2", “Part 3", “Part 4"], deque([“Part 1", “Part 2", “Part 3", “Part 4”]))) Output: True |
Test case for the algorithmdef stack_from_list(input_list, value_to_search, expected): |
|
I cannot understand why Github don't write the indentation in this case. def test(input_list, expected): from collections import deque
some testsprint(createstack([55, 44, 32, 27], deque([27, 32, 44, 55]))) (True) |
|
|
|
from collections import deque #test case for the algorithm
#code of the algorithm
#tests run |
|
Hi all, First, you can find my solution as Python file in the GitHub repository. a few very important comments for this (and future) exercise:
|
Create the test case for the algorithm introduced in Listing 2.
The text was updated successfully, but these errors were encountered: