CORRECTION: The time complexity for the first "for" loop is O(5), not O(4) - not that it changes much!
Source: https://www.hackerrank.com/challenges/equal/problem
Code (JavaScript): https://gist.github.com/Shaddyjr/b50acadc193bbd057abdb851859731c1
Code (Python): https://gist.github.com/Shaddyjr/bc2630b6f7e24162b201f2dc20fa5a49
Intro: 0:00
Solution Walkthrough: 1:24
Code Walkthrough: 7:55
As a way to improve my coding skills and technical interview prep, I practice HackerRank problems and try my best to show in-depth solutions. This allows viewers to see my thought process and problem-solving techniques. I also delve into tutorials about building out data structures, algorithms, and various other relevant and practical topics.
I mainly code in JavaScript and Python. I also occasionally detour onto other challenges, like those from my own technical interviews, daily coding challenges, or just fun coding puzzles I come across.