Monthly Archives: November 2011

Selection vs Insertion Sort

Continuation of previous post… For semi sorted data, Insertion sort is a lot faster than selection sort.  Insertion sort can sort of tell that’s it’s sorted so there is not as much swapping necessary. Selection sort still does all the … Continue reading

Posted in Coding | Tagged , , | Leave a comment

Ruby: Neat function uniq.size

My first Ruby program ever was to write a function to determine if a triangle given the size of its size, was scalene, isosceles or equilateral. I wrote if statements to see if the sides were equals, but ruby can … Continue reading

Posted in Ruby | Tagged | Leave a comment

Longest Palindrome In A String

Ran across the Longest Palindrome In A String problem today and tried it out. Saw that there is a linear solution but have yet to try it out. I’ll be trying that out next once I make sense of it. The … Continue reading

Posted in Coding | Leave a comment

Setting up Ruby and integrating Ruby with Eclipse IDE

Need to setup my Ruby environment on a Windows systems yesterday. Here’s how I did it: Download Ruby installer or source from here. Install. I’d recommend checking the ‘add to PATH’ box in one of the installation screens. Add the … Continue reading

Posted in Ruby | 3 Comments