Algorithms for Dummies

November 7th, 2008 in Coding, Rants - 2 Comments

I’m taking my second algorithm class this semester. So far, I think I understand a lot of the algorithms discussed in theory. The problem is translating them to code. Most of the algorithm textbooks I’ve come across are so technical, I haven’t the foggiest idea how to actually go on.

The biggest problem, I think is that I cannot even implement the most basic structure needed — a binary tree — not to talk of directed and undirected graphs. Not knowing doesn’t necessarily translate to not wanting to know, and the fact that I can’t write a simple Insertion-Sort algorithm kind of makes me feel down.

I’m dusting off my old C++ book and starting over again from arrays and linked lists. 🙁

If you happen to know where a poor coder-wannabe can get a simple algorithms book — with code examples — I’d be very grateful.

2 Comment so far

  • El-Halaby
    November 7, 2008 at 3:55 pm

    You got to know data structures before learning algorithms, that’s why an algorithm class is usually called data structures and algorithms.

    Graphs and trees are basic data structures, you can find their implementation code in every data structures book, my favorite book is Data Structures
    & Algorithms in Java by Robert Lafore. I am pretty sure the same book is written for C++ programmers.

    If you are interested in Graph algorithms, there is a book called Algorithms in Java, Third Edition, Part 5: Graph Algorithms by Robert Sedgewick, the C++ version of this book exists also (almost sure).

    There is a Wikibook: Data Structures {fundamental tools}, here is the link:
    http://en.wikibooks.org/wiki/Data_Structures

    Good luck
    Bye

  • November 14, 2008 at 11:33 am

    Thanks El-Halaby.

    I knew something was wrong but couldn’t exactly tell what. You see, I never took the Data Structures class which apparently covered implementation in C++. Thanks once again man!