Monthly Archives: August 2019
Structured bindings are a useful new feature in c++17. They are particularly handy where you have multiple return values. Here are some examples showing how things have evolved over different versions of c++:
Here are some basic logic gates and how we can combine them to get an XOR: In order to perform addition of arbitrary length binary numbers we first start with creating a Half Adder, which can add two single binary … Continue reading
Here are some whiteboard notes I created on c++ lambda expressions. I should create a digital/html version of this reference.
This problem solution relies on binary exponentiation. The key insight is that 2^10 = 2^5 * 2^52^5 = 2^2 * 2^2 * 2So we can base our solution on recursively solving pow(x, n/2) and multiplying it by itself to get … Continue reading
I’ve created a Sudoku puzzle solving app. See details here:
Use a hash map with key being the sorted word and value being a vector of strings of all instances of that anagram. Iterate through input array, filling the hash map. Then iterate through the hash map adding the map … Continue reading