Implementing number to Roman converter like this made me feel like a moron. But, hey, this piece of code works...
Forced my brain to work a bit more, managed to simplify the solution.
(Surprised that it was a medium one. I've a feeling that converting the other way around was more complicated but it was marked as Easy.)
@TiredRaven if it works, it works
@Wearwolf absolutely! Especially in the context of LeetCode. The solution is accepted, might as well move on :)
@TiredRaven
Truly no more humbling experience than LeetCode. Often has me questioning if I actually know anything about programming
@midas Yup, I started with the easiest tasks, with the solution being already implemented in C++ standard library. Went at a snail's pace, frustrated as hell.
Double frustration because I've never required anything like that at work