HackerEarth Array's force problem solution - TheCScience