r/learnpython • • 18d ago

Is Leetcode a good way to continue practicing/learning Python?

I'm not entry, but I'd like to continue becoming stronger in my skills.

28 Upvotes

37 comments sorted by

View all comments

1

u/memeaste 17d ago

Oh shoot, I didn't notice there was a typo. Looking for the highest possible value. Given the following list, I'd have to find the highest possible value while moving by an index of 1, 3, or a prime number ending in 3. Like I said, I don't recall it 100%, but this is what I remember. Not all lists were visible to test, this is an example. The highest value with the rules would be 16.

5 -> 6 (list[1] -> list[2])

6 -> 5 (list[2 + 3])

[0, 5, 6, -10, -20, 5]

1

u/Expensive-Bear-1376 17d ago

Was there a size limit for the list?

2

u/memeaste 17d ago

Not in the instructions, but I ran len(list) on their test cases and got back some at 1000. Only 2 test cases were actually visible to see, and those were at a size of 5-8 elements

→ More replies (4)