Sunday, July 22, 2012
Tuesday, June 12, 2012
How to clone a graph
A nice article on how to clone a graph:
http://www.leetcode.com/2012/05/clone-graph-part-i.html
Sunday, June 3, 2012
Reverse a Linked List Recursively and Iterately
struct ListNode { ListNode* next; int data; }; ListNode* reverseListResursive(ListNode* head) { //Initial if(head == NULL) return head; if((head->next)== NULL) return head; ListNode *newHead = reverseListResursive(head->next); head->next->next = head; head -> next = NULL; return newHead; } ListNode* reverseListNonResursive(ListNode* head) { //Initial if(head == NULL) return head; //if((head->next)== NULL) return head; ListNode *newHead = head; ListNode *tempNext = NULL; while(head) { newHead = head; head = head->next; newHead->next = tempNext; tempNext = newHead; } return newHead; }
Tuesday, December 13, 2011
Monday, December 12, 2011
The Boost C++ Libraries
The Boost C++ Libraries
http://en.highscore.de/cpp/boost/
http://www.boost.org/
How to use Boost in Visual Studio 2010
http://stackoverflow.com/questions/2629421/how-to-use-boost-in-visual-studio-2010
Boost Image Processing (GIL) http://stlab.adobe.com/gil/presentation/index.htm Boost Graph Library http://www.boost.org/doc/libs/1_48_0/libs/graph/doc/index.html
http://en.highscore.de/cpp/boost/
http://www.boost.org/
How to use Boost in Visual Studio 2010
http://stackoverflow.com/questions/2629421/how-to-use-boost-in-visual-studio-2010
- Unzip the latest version of boost (1.48.0 12/11/2011) into a directory of your choice (e.g.
d:\boost_1_48_0
). - Create a new empty project in Visual Studio 2010.
- Open the Property Manager and expand one of the configuration for the platform of your choice.
- Select & right click
Microsoft.Cpp.
, and select.user Properties
to open the Property Page for edit. - Select
VC++ Directories
on the left. - Edit the
Include Directories
section to include the path to your boost source files. - Repeat steps 3 - 6 for different platform of your choice if needed.
Boost Image Processing (GIL) http://stlab.adobe.com/gil/presentation/index.htm Boost Graph Library http://www.boost.org/doc/libs/1_48_0/libs/graph/doc/index.html
Sunday, December 4, 2011
Saturday, November 19, 2011
Pigs Get Fat, Hogs Get Slaughtered!
Pigs get fat, Hogs get slaughtered!
I love this proverb, it tells me the most important business rule.
I love this proverb, it tells me the most important business rule.
Subscribe to:
Posts (Atom)