@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 @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
@LukeAlmighty @kumicota I think that the meme pretends to show how when in interviews when you're start to talk, right or not, they stop you right there silently
@LukeAlmighty @navitux @kumicota
This just worked for me:
>>> myarray = [1, 2, 3, 4, 5, 6, 7, 55, 44, 33, 22, 15, 14, 13, 12, 11] >>> first = 0 >>> second = 0 >>> for i in myarray: ... if i > first: first = i ... if i > second and i < first: second = i ... >>> first 55 >>> second 44 >>>
@mystik @LukeAlmighty @kumicota I explained that's NOT the point, but thanks
@LukeAlmighty @mystik @kumicota I think so 😅
@mystik @LukeAlmighty @kumicota I'm using the browser, it's good I think
@mystik @LukeAlmighty @kumicota Are mastodon sites blocked/censored in your country?
Sorry, it's the worst
@mystik @LukeAlmighty @kumicota I see, is this for privacy or just for speed up sites (it would be ironical)
@mystik @LukeAlmighty @kumicota good for you, no one cares about that until they got hacked or backmailed
@mystik @LukeAlmighty @kumicota by the way: Do you recommend some good free-paid proxy or VPN ??
Because I heard about using TOR as vpn, but I'm not sure if it really works
@mystik @LukeAlmighty @kumicota I see
@mystik @LukeAlmighty @kumicota Hi Mystik, by the way, I got curious, and I'm using mastodon web client with TOR network as Proxy for privacy some hours ago and I found it more than usable, the UX is good for me
@kumicota @navitux
There is a reason I gave up on programming
I am just not smart enough, and am too easy to overload on long sessions of thinking.