Skip to content

Conversation

@melissa-nguyen
Copy link

No description provided.

Copy link

@CheezItMan CheezItMan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work Melissa, you hit the learning goals here. I do encourage you to try the space/time complexity questions as it's good practice.

@@ -0,0 +1,7 @@
{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .vscode folder could be added to .gitignore

Comment on lines +12 to +24

# default both variables to the first index b/c the first index is the max value and max ending thus far
max_so_far = nums[0]
max_ending_here = nums[0]

for i in range(1, len(nums)):

max_ending_here = max(max_ending_here + nums[i], nums[i])

# continue updating value of variable as we itr
max_so_far = max(max_so_far, max_ending_here)

return max_so_far

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 space/time complexity?

Comment on lines 7 to 9
Time Complexity: ?
Space Complexity: ?
"""

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Space/time complexity?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants