Did it pass? That’s the surest way to know if it’s good enough.
Words of advice, though, the mods are starting to take a hard look at solutions being posted in the forums (fora?) – when the answer is right there, it becomes less of a challenge for others coming along behind you.
If you have specific questions about why some code DOESN’T work, or something like that, go ahead and post the code and question. Often, when I post suggestions or code hints, I will wrap them in spoiler tags, to make it easier for those coming along to have to deliberately un-hide them. But really, don’t post complete solutions to the boards.
In that case, I’ll PM you a much more succinct solution. That will keep it off the public board. Yes, your answer works fine. Just… always another way.