Daily Challenge (160 Part Series)
You're saying goodbye to your friend when they say to you, "See you next happy year!" You smile and wave, saying you'll see them then. But wait, when's the next happy year anyway?
Given a year, write a function that will return the closest year you'll see your friend, the next year with all unique digits.
Years will always be represented as positive integers. It is not necessary for the year passed through the function to be a Happy one.
nextHappyYear(7712) ==> 7801
nextHappyYear(1001) ==> 1023
nextHappyYear(2018) ==> 2019
Want to propose a challenge idea for a future post? Email email@example.com with your suggestions!
Throughout the last year, I have worked part-time as a working student and also studied at the university. I was not the first and not the last one who has combined that during their studies, but the problem for me was, that at the end of the day I have felt absolutely exhausted mentally and physically. That caused problems with my health and motivation to continue working on my goals or anything. (yeah, “goals,” I wish I had something more specific at that time).