Attempts at rewriting java from "Algorithms 4th edition" book into Ruby