Domanda di colloquio di Microsoft

Write code that reverses words in a string.

Risposte di colloquio

Anonimo

8 dic 2016

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

1

Anonimo

20 feb 2019

print(string1[::-1])

Anonimo

30 dic 2016

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