Pergunta de entrevista da empresa Toast Inc

a) Reverse string. given a string, just straight up reverse it. so "hello world " was " dlrow olleh" (i believe I was supposed to maintain the whitespace, but I can't remember tbh, this was something he confused me on and kept explaining it weirdly so I kept going back and forth) b) Reverse the words in the string. given "hello world" return "world hello" (keep the spaces, again idk if this right though) c) Reverse words in a string but maintain the punctuation in the original positions. So given "hello, how are you doing?" return "doing, you are how hello?" could've been a 4th part I didn't get to but this is as much as I did