Software Engineer & Tech Writer

Engineering performant systems & exploring algorithmic design.

Hi, I'm Vivek Soundararaj. I write about Modern C++, data structures, algorithmic complexity, and systems engineering.

Recent Writing

View archive →

Cartesian Matching Algorithm

Every now and then I encounter algorithms that is both intuitive as well as far-reaching. The algorithm to be described in this post is called Cartesian Matching Algorithm. Bear with me here,...

Day of the date

I like seeing elegant algorithms arise out of prodigious mathematical methods. One such is calculating day of any date in O(1). Let’s take a look at the implementation. int getDay(std::vector<int> date){ int...

Variadic Templates

One of the remarkable features of Modern C++ is variadic templates. Ability of templates to take variable number of was initially designed by Douglas Gregor and Jaakko Järvi and then standardized in...

Linear Time Median

Median is considered one of the important measures in Statistics. Unlike Mean, it is not skewed by a few very large values in the dataset. Computing Median can seem like a trivial...

C++ Smart Pointers - What they do and How they work?

I recently had a chance to watch an interesting CppCon lecture by Arthur O’Dwyer titled Back To Basics: Smart Pointers. Atleast for me, the talk was a pretty good review/refresher of what...

Quack - A Queue and a Stack in one

Quack is an unique data structure that combines the properties of both Stack and a Queue. The structure can be viewed as a list of items written from left to right. It...