Pregunta de entrevista de Microsoft

Write code that reverses words in a string.

Respuestas de entrevistas

Anónimo

8 dic 2016

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

1

Anónimo

20 feb 2019

print(string1[::-1])

Anónimo

30 dic 2016

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