@navitux
Sorting is dumb move in this case.
First: do a pass through the array, saving position and value of the highest one.

Then do a 2nd pass, where you grab the highest value the same way, but skip the field with highest value (as found during the 1st pass)

@kumicota @navitux
Yeah... That might require a few more lines of code, but I can see it working :ablobthinkingeyes:

Follow

@kumicota @navitux
There is a reason I gave up on programming :blobcatnerd:

I am just not smart enough, and am too easy to overload on long sessions of thinking.

@LukeAlmighty @navitux mine is more from experience tbh, there's a lot of people way better than I in programming

@kumicota @LukeAlmighty Don't be afraid to make mistakes, sometimes I feel overwhelmed, but it's ok, just don't stop for that reason, that's why I keep working on my little github project for example

Sign in to participate in the conversation
Game Liberty Mastodon

Mainly gaming/nerd instance for people who value free speech. Everyone is welcome.