Might I humbly suggest that you check out some videos of the algo you're trying to implement on YouTube first and then try implementing it w/o looking at (pseudo)code. I gave up my first 2 times and peeked at code, but after those I got the hang of it. Also tuples.