And here I am solving it by divide and conquer when there are such simple answers.
Well atleast it served as practice and to see that there's always an easier way to do things.
Thank to everyone who solved it, you all gave me good programming ideas.
the logic of the kata is unclear:(
ctrl-h -> \t -> four spaces
You're code is obviously wrong, since I can see 76 in the array which qualifies as a sub-array on its own.
This comment is hidden because it contains spoiler information about the solution
IndentationError: unindent does not match any outer indentation level. I reseted it several times, still same issue
Read QuantumRobotix's post below instead of opening another issue about the same. Try what I suggested there.
I'm also having an error "IndentationError: unindent does not match any outer indentation level". Works fine on vscode.
Hi, if you have not yet got an answer to your question/ figured it out yet, I beleive you have copied the incorrect sequence. there should be a 4 where you put a 5 instead ie:
[-2, 1, -3, 4, -1, 2, 1, -5, 4]
[-2, 1, -3, 5, -1, 2, 1, -5, 4]
making the max sub-array [4, -1, 2, 1] which would be equal to 6.
Hope this helps
Click reset, start over (chose either spaces or tabs), I've tried it myself and I didn't get that error.
If you still get that error, post your code here, following these instructions: https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution#post-discourse
I keep receiving the following error when I attempt to write a for loop in my code for Python:
IndentationError: unindent does not match any outer indentation level
I'm completely stumped on how to fix this, and tried using spaces and tabs for my indentation but to no avail.
The second loop should loop until the last element of the list
Anyways "looks like u solved it"