InfinityLabs R&D interview question

implement power function, implement string reverse function.