Robert Sedgewick

Robert Sedgewick

Learn from the Guru of Algorithms – his recent talks, courses, papers etc.

coursera also offers a course on algorithms by Robert Sedgewick

CS courses


Boost articles on C++

C++ Coding standards

Boost documentation and the library

IDEs on the Linux platform

Good IDEs
eclipse linux tools
Gvim got a good plugin for C/C++ called cvim.

Dynamic Languages

Reversing a linked list

Copyright Donovan Rebbechi 2001. This tutorial may be distributed freely if this copyright notice is preserved. Changes require authors permission. The code is no-strings attached free software, it may be redistributed, modified, and used.

class List
struct Node
Node(const T& data, Node* next=0):data(data),next(next) {}
Node* next;
T data;

List() : head(0) {}

Node* begin() { return head; }
Node* end() { return 0; }

void reverse()
Node* p = 0; Node* i = begin(); Node* n;
while (i)
n = i->next; //This saves the address of the next node
i->next = p;//// make the next pointer point to previous node
p = i; //// update previous node to point to “current”
i = n;// recall the address of the node after i
head = p;
Node* head;

To reverse the list, we need to traverse the list, and modify the next pointer of each node, so it points to the previous node.

Circular lists: A circular list is a linked list that has the property that the last node in the list contains the address of the first node.

Coding Standards – One of the most comprehensive coding standards I have seen till date. Across Languages(compiled and interpreted) and architectures.

Back to Basics – I always love to read Joel Spolsky’s articles and this one is probably one of the best.