Skip to main content
6 events
when toggle format what by license comment
Jun 5, 2016 at 16:34 comment added Jonah you solution is quite verbose, and looks like C rather than ruby. you'd be much better off learning to use ruby the way top voted solution does than trying to improve yours a line at a time. the problem is the entire approach. there is always a better solution in ruby than a nested if and there is usually a better solution than an if statement, period. what the top solution highlights is the essence of the algorithm, which is just a single subtraction statement. that essence is completely lost in your solution.
Jun 5, 2016 at 9:02 answer added 200_success timeline score: 6
Jun 5, 2016 at 3:25 history edited 200_success CC BY-SA 3.0
added 14 characters in body; edited tags; deleted 3 characters in body
Jun 4, 2016 at 23:20 history edited Tunaki CC BY-SA 3.0
added 2 characters in body; edited tags
Jun 4, 2016 at 21:57 review First posts
Jun 4, 2016 at 23:20
Jun 4, 2016 at 21:55 history asked David Haley CC BY-SA 3.0