I dont want to be an ass but how do you not know how to invert a tree? Anyone who knows how to write a tree and traverse it should be able to do this. If you ran out of time coding it then that's different.
If you're spending 45 minutes writing 5 lines of code, it is not definitive, but certainly a red flag.
If you have a definition, please elucidate.