QuickSort in Python

Just thought I’d post this little snippet to illustrate the facility with which array and list functions can be performed in Python, as opposed to classical languages like C++   Here’s a QuickSort implementation in C++, I’m not saying it’s the best, but hell it’s a QuickSort. Now look at the same in Python: I [...]

Posted at 1:27 pm on January 14, 2012 | leave a comment | Filed Under: Uncategorized | Tagged: , , | read on

Int32 RangeTo() method

This little snippet, inspired by Ruby’s Range() method, allows you to do stuff like this; I haven’t done any performance metrics yet, but I like the removal of human error in using this for iterations over arrays and datatables. Here’s the extension class.

Posted at 3:16 pm on December 7, 2011 | leave a comment | Filed Under: Extension Methods, Uncategorized | Tagged: | read on

Pages

Archives


Follow

Get every new post delivered to your Inbox.