Frage im Vorstellungsgespräch bei Microsoft

Write code that reverses words in a string.

Antworten zu Vorstellungsgespräch

Anonym

8. Dez. 2016

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

1

Anonym

20. Feb. 2019

print(string1[::-1])

Anonym

30. Dez. 2016

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