Figuring Out Hugo
Here are some notes from setting up a basic Hugo site with the ananke
theme.
I followed the official quickstart guide but had to figure out a few things along that way, which I make a note of below.
Theme setup as Hugo module
The quickstart has you setting the ananke theme up as a Git submodule, but apparently this is the old way of doing things. The new recommended way of installing themes is to set it up as a Hugo module. From a high level, you
Bitwise XOR of All Pairings
Problem
You have two arrays of non-negative integers nums1
and nums2
. Let nums3
be the array of the XOR of all pairings between nums1
and nums2
. Return the XOR of all integers in nums3
.
Approach
The description is essentially one big XOR sum of XOR’d pairs, which makes me think this is an exercise in the properties of XOR. Since XOR is commutative, we can just ignore the fact that the numbers are paired and tally the overall frequency of each number. If the frequency is even, that number goes to 0, otherwise the number stays.