Pergunta de entrevista da empresa Microsoft

Write code that reverses words in a string.

Respostas da entrevista

Sigiloso

8 de dez. de 2016

$string = "Write code that reverses words in a string" $words = $string -split " " [array]::Reverse($words) $words -join " "

1

Sigiloso

20 de fev. de 2019

print(string1[::-1])

Sigiloso

30 de dez. de 2016

string.split('').reverse().join('')