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
Apparently, there is an STL-like library in Python, called Pythonds. I don’t how far it extends, given that I only just discovered it, but it has all the regulars: Priority Queue, Tree/Heaps, Graphs (adjacency list version only, I think), etc. I’m going to kill two birds with one stone and knock out a review of … More Dijikstra Review and a new Python Library.
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
I am, by nature, an introvert. I find that too much social interaction, on the whole, can be draining. I want to code, to do research, to learn new computer science concepts, I’m not naturally drawn to positions where team coordination is the primary focus. I noticed that all of my professors eventually ended up doing … More Why did I become Scrum Master?
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?
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
Rather than explaining what dynamic programming is-just use Google for that-I’ll make it clearer through an example. It’s not that hard of a concept, a priori, once you get the the idea behind it and you’ve done a few practice problems with it. Look at Problem #18 in Project Euler. You could brute-force this by … More Dynamic Programming: Example 1.
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
I have recently conceived of an interesting little side project, mainly as a nice study hack to myself, but it might also be of practical use to others. Like many non-computer science majors in college who developed an interest in programming and CS, I eventually studied data structures and algorithms on my own and grew fascinated … More An interesting little project…
I learned about red-black trees a while back, but I never took the time to truly understand them in depth. I wish I had: it is a quite useful data structure that preserves much of what is good in a BST while ensuring that, in the worst case, insertion and retrieval are logarithmic complexity. Consider … More Introduction to Red-Black Trees.