Smart pointers

Never ceases to amaze me how much there is to C++… and how much many scientific users don’t bother to learn. Pointers, in spite of being a simple concept, are probably the single most common reason for people dropping out of C/C++ based courses nation-wide. They are the number-one cause of segmentation faults, memory leaks, … More Smart pointers

Kahn’s Algorithm for Topological Sort

Graphs and trees are without a doubt my favorite data structures. It’s a funny thing, having favorites. Sometimes, you don’t really have a logical reason at all: it’s just about what you are interested in. Like, say, preferring elliptical PDEs to hyperbolic ones-that can glean into what you might be doing research in, but it doesn’t … More Kahn’s Algorithm for Topological Sort

Why are red-black trees used so much for STL containers?

Man, I love the fact that I love learning again… and I’m not simply accepting fait accomplis. The map and set templates in STL-and their multi variants-are great when you need to look up something by a key. Since these containers in STL are all ordered, what data structure should you use to implement them? … More Why are red-black trees used so much for STL containers?

Master Theorem

A handy little trick that I picked up last year when self-studying algorithms before HR. Again, this is one of those things I think most self-taught programmers don’t pick up, and might do well to learn. I’m going to keep it simple since I’m still figuring out how to really format things in WordPress. Suppose … More Master Theorem

Update

I have neglected this blog over the past couple of weeks. I’ll be blunt: blogging is not really my natural thing. However, I’m going to aim to try and get back on track for the next month, because it would be good for me. I doubt I’m going to get around to the project I … More Update