LC: 1199. Minimum Time to Build Blocks - spiralgo/algorithms GitHub Wiki
1199. Minimum Time to Build Blocks:
The Essence:
I leave an explanation from LeetCode which makes it easy to understand why this greedy approach is related to the Huffman compression algorithm.

Details:
For a detailed explanation and implementation please refer to the corresponding PR: