HackerEarth Supertables problem solution - TheCScience