Quick, how do you sort an array? How you answer this depends on where you're coming from. If you're a C programmer, you might go on about the merits of quicksort or mergesort. If you're from C++, the standard template library has facilities for this. But this is Ruby, how do you do it? Well, you call the sort method, but there's slightly more to it than that. Being a high level language, Ruby has isolated you from the sorting algorithm itself, but given you very easy sorting and a very easy way to change its behavior.
Comments
No comments yet. Leave a Comment
