Blogs

Code Highlighting Showcase

import kotlin.math.ceil /** * 2870. Minimum Number of Operations to Make Array Empty * @see <a href="https://leetcode.com/problems/minimum-number-of-operations-to-make-array-empty">Source</a> */ fun interface MinOpToMakeArrayEmpty { operator fun invoke(nums: IntArray): Int } val minOpToMakeArrayEmptyCounting = MinOpToMakeArrayEmpty { nums -> val counter = mutableMapOf<Int, Int>() for (num in nums) { counter[num] = counter.getOrDefault(num, 0) + 1 } var ans = 0 for ((_, count) in counter) { if (count == 1) { return@MinOpToMakeArrayEmpty -1 } ans += ceil(count.
Read more >

Prism Code Highlighting Showcase

This theme uses Prism for code highlighting. Other Hugo themes usually include a pre-configured version of Prism, which complicates updates and clutters the source code base with third-party JavaScript.

Only the Prism features you select in the Hugo site configuration are bundled by the build process. This way, Prism can be easily updated with npm and the size of the JavaScript and CSS bundles are minimized by only including what you need.

Read more >