Tag: coding
-
Moving boxes to one spot – Leetcode coding problem (Medium)
Another fun problem that was pretty easy solve is moving boxes to one spot: https://leetcode.com/problems/minimum-number-of-operations-to-move-all-balls-to-each-box/ It can be solved by iterating over an array and summing difference in distance between elements. Solution in Javascript: