But I believe that solving this kind of challenges forces one in a good way to know more about what the language has to offer, while keeping motivated to learn its constructs before being able to create real apps.
I'm using the [cryptopals challenges](https://cryptopals.com/) to learn java ATM, seems like a good approach because they pretty quickly force you to do stuff that expose important parts of the language ("how do I get bytes out of a string?" "how do I do i/o?" "how do I xor two strings?" "how do I find a crypto library and use it?")
I think this kind of thing is more useful than hackerrank or euler-style problems, at least if you're learning a language in a paradigm you already know? If you can hack together a binary search in one functional language you can probably do it in another one pretty easily. Though might be more challenging moving from one paradigm to another.
But I believe that solving this kind of challenges forces one in a good way to know more about what the language has to offer, while keeping motivated to learn its constructs before being able to create real apps.
The goal is practicing a new language.