Re:My Favorite Programming Problem to Teach: Digit Length
by hechang1997 on Sunday November 10, 2019 @11:07PM
(#21502064)
I don't know about this. This feels like cheating rather than thinking outside of the box. Like when you ask a student to implement a vector in C++, instead of writing the code the student makes a wrapper around std::vector. Internally, `str` probably also use some equivalent of the naive solution implemented somewhere to convert a integer to its decimal string.
[ Parent
| on HN ]