Open
Conversation
icanhardcode
suggested changes
Sep 13, 2021
homework1/task02.py
Outdated
| a, b = b, a + b | ||
|
|
||
|
|
||
| def check_fibonacci(data: Sequence[int]) -> bool: |
There was a problem hiding this comment.
You dont need to generate a new sequence for check
homework1/task03.py
Outdated
|
|
||
| def find_maximum_and_minimum(file_name: str) -> Tuple[int, int]: | ||
| max_value = 1 | ||
| min_value = 1 |
There was a problem hiding this comment.
File can contains only "1", so you cant return "1" as max and min values
homework1/task05.py
Outdated
| def find_maximal_subarray_sum(nums: List[int], k: int) -> int: | ||
| summ = 0 | ||
| overall_sum = 0 | ||
| current_sum = 0 |
There was a problem hiding this comment.
Test your function with that data
find_maximal_subarray_sum([1, 4, 7, -10, 6, 1, 1], 3)
tests/homework1/test_task02.py
Outdated
| check4 = [] | ||
| check5 = [0, 1] | ||
| check6 = [55, 66] | ||
| check7 = [3, 5, 8, 13, 21, 34] |
There was a problem hiding this comment.
Add these params into functions or use pytest's parametrize
icanhardcode
suggested changes
Sep 27, 2021
homework1/task03.py
Outdated
Comment on lines
+18
to
+19
| max_value = 0 | ||
| min_value = 0 |
| from typing import List | ||
|
|
||
|
|
||
| def find_maximal_subarray_sum(nums: List[int], k: int) -> int: |
There was a problem hiding this comment.
test with find_maximal_subarray_sum([1, 3, -1, -3, 5, -3, 6, 7], 3)
icanhardcode
approved these changes
Oct 10, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.