Writing A More Ruby-ish List Intersection Function And Sorting Structs
In my previous post on boolean search, we wrote an efficient list (array) intersection function. But, to be honest, I wasn’t very happy with it. Considering the fact that we were using Ruby, it just wasn’t very Ruby-like. So, this time I am going to try and show how that function can be re-written to make it more Ruby-ish and to also be tighter and easier to understand.
Post a comment