X509: reverseWord

Given a word, use a stack to reverse the word and return a new string with the original word in reverse order. You cannot use the reverse string methods in the String class.

Examples:

reverseWord("hello") -> "olleh"
reverseWord("hallo") -> "ollah"

Your Answer:

Feedback

Your feedback will appear here when you check your answer.