r1cc4rdo/daily_coding_problem

Solution of problem 9 seems not correct

Closed this issue · 3 comments

Hey there,
I run into this just because I'm on daily coding problem as well. I like your coding style. Very concise. That's brilliant. But I still want to point out that some of your solutions are too simple to be good. More edge cases need to be tested.
For example, solution of problem 9 won't work for [1, 2, 3, 4, 5, 6].

I see what happened.

I interpreted the problem definition as "the largest sum of any two non-adjacent numbers", hence my solution. I'll accept your pull request as it's a more precise interpretation of the problem statement and leave mine as an alternate with a note.

Thanks!

Yep, you get my point. Thanks for reviewing the code.
And like I said before, as I am having my hands on solving these coding problems every day, I will keep an eye on your solutions as well. I will continue to send you a pull request if I detect some other issues. Let's make it better.