So it should go something like Work at a solution > Use the Hint > Solution?
Generally, it depends. It's not a rigid thing because you may find more or less difficulties in different exercises. But in general terms, it should go something like:
If you do this, then you'll be making a honest effort to solve the exercises, which is an excellent way to learn and very efficient. But also, that "second spin" will make you think more about the solution you reached and trying to identify things that "could be better" is also very good. Finally, after all that, actually comparing with other solutions gives you different perspectives, but this, again, is best if you do go that extra step to really analyse why they did it differently and why that matters -if it does-.
As for "using built-in methods"... That depends on the exercise. You'll need to decide on your own. I'd say that you can generally use them. But if you notice that it "feels like cheating", that is, that it solves too much of the problem, then the exercise is probably meant to be solved without those methods.
Say an exercise is "write a function that get the position of an element in an array" and you go and use arr.indexOf(element)
. Well, that works... and yes, in a production environment that is exactly what you would be writing. But as an exercise it's clear that it was meant for you to actually implement the search in the array, not use the existing method.