`

Blog

Don't take the post dates on this page as a measure of how often I blog. I update my Books page and Euler page quite often.

HackerRank: Frequency Queries

Posted: 18 February 2019

Seemed easy at the start as I misread query 3. I read it as if there exists at least one of this number in the data structure. I tried coding this immediately without writing it on paper, and was stuck pretty quickly or found out I was heading down in...

HackerRank: Is this BST?

Posted: 16 February 2019

I first implemented this using a stack - it wasn’t too hard to get everything up to speed. It was only until I tried submitting it, that HackerRank did not allow me to use additional data structures (or perhaps I could but just didn’t know how). The only other way...

HackerRank: Encryption

Posted: 13 February 2019

A simple problem. Not sure why I’m even writing about it but here goes. It was simply executing it and knowing how to use vector and manipulating the grid well. I first coded on paper, and then wrote the code directly into the HackerRank screen. Made a small mistake in...

HackerRank: Swap Nodes

Posted: 12 February 2019

This question was pretty involved. I never knew that implementing a tree was this hard in C++. In addition to that, I refreshed my knowledge on the various traversals and realized that I’ve totally forgotten about each type of traversal. Once you get the tree data structure right, the question...

First Post of 2019

Posted: 8 February 2019

First post of 2019 in February instead of January! Well, that’s not too bad. I was really busy in January and did not carve the time out to do a review. This is not an excuse though. I just did not try hard enough. This post will be about reviewing...