DEV Community

Discussion on: Daily Challenge #250 - Last Digit of a Large Number

Collapse
 
wrightdotclick profile image
TJ Wright

I think this Ruby solution underestimates the complexity required with huge numbers, although the .digits.first is clever! Using a mod 10 solution, like some of the solutions above, would greatly reduce the time/space complexity. brilliant.org/wiki/finding-the-las...