Last weekend, HackerRank hosted its 1st live streaming event in which Michal Danilak, more famously known as Mimino, achieved a herculean feat. Mimino solved ALL 78 Project Euler challenges in under 24 hours, at a rate of about 18 minutes per problem!
Although C++ is his best language, Mimino used at least 13 languages altogether. In fact, he learned several different languages on the spot, like parts of Bash and PHP. Here’s a breakdown of which languages he used by frequency. The graph doesn’t include Python 2 & 3 as separate languages:
The well over 8,500 passionate folks who tuned into the live stream throughout the 24 hour event were in some grand company. The legendary world’s highest ranked competitive coder Petr Mitrichev joined the live chat to commend Mimino on this awesome undertaking and even guided Mimino through a roadblock! He said: “I’d check for int overflows, your output starts breaking around 2**16.”
Michal Forišek, Gaoyuan Chen, even the problem writers and administrators from Project Euler all joined the lively conversation to offer tips and well wishes to Mimino. The superstar of the day even live chatted with the community directly, answering questions about his approach.
“It’s a great idea and an awesome event, hope you get through all of them :)”
– Petr Mitrichev
Watching Mimino tackle all 78 problems was awe-inducing to the say the least. No matter how many times he was stuck, down to the 24th hour, Mimino never seemed too frustrated or even close to giving up. It was the perfect place for a dose of inspiration, evidenced by some amazing comments from community members:
We had a chance to catch up with Mimino after the event. Check out what he had to say about the event:
Mimino, how do you feel after coding live for 24 hours straight?!
I feel awesome! During those 24 hours I received so much positive energy from the people who were watching, chatting and motivating me. It was great to see so many people excited about the competitive programming and problem solving.
How did you feel when some of the world’s greatest coders joined the live chat?
When Petr Mitrichev showed up, I was just struggling to find a nasty integer overflow bug in my code at the time. Right after he joined, he was the first one to discover it and let me know about it, so it really shows who is the best in this game.
But knowing that he is watching me now, I felt much more pressure. But then, when he said that the event like this is a great idea, it gave me a boost for the next couple of hours. It was great to see the best of the best to stop by and cheer for me.
What impact do you think this feat have on you and the programming field in general?
In the Q&A interview before the event, we were talking about the recognition for top competitive programmers, and I said that the current format of the events doesn’t really support people to have fans.
What I think this event did successfully was to show that there is a big potential in this area. We saw that people can get excited about the competitive programming and competitive programmers. And we also showed that events like this can be not only educational but also entertaining. I do believe that 24-hour programming challenge was in this sense a successful proof of concept and I feel glad that I was part of it.
Some commentators wondered if you are human. What motivated you throughout the event?
As I have already answered on Quora, every time someone compared me to Batman or Terminator, I just couldn’t ruin that image by having a rest. 🙂
Which were the toughest challenges for you and how did you overcome them?
I think my biggest crisis came around 6 a.m. (21 hours into the challenge) when I opened the problem #64 with continued fractions and then the problem #66 with Diophantine equation, which solution is again based on the continued fractions.
I just couldn’t get my head around how continued fractions work at that hour, so I was just blindly trying to imitate the method shown in the problem statement. My solution was really just “fake it until you make it” type of solution. But then again, I have demonstrated a couple of times during the event that I’m able to solve the problem, even though I have no idea what I’m doing.
After nearly 24 hours of challenges, Mimino walked away with invaluable insight on how to best tackle the Project Euler challenges. We asked him for his 3 key tips and tricks that helped him get through the event. These are his suggestions for any developers looking to attempt the same feat:
If you’re looking to practice, he suggests the challenges below:
Seeking patterns in answers you encounter can help to simplify the process.
This is the biggest speed optimization you can get. Once you have the answers precomputed, outputting them has time complexity O(1).