Skip to content · ⁨본문 바로가기⁩

Reverse the word order · ⁨단어 순서 뒤집기⁩

English

Reverse the word order

Given a sentence of space-separated words, return the words in reverse order: the quick brown → brown quick the. Split on spaces with s.split(" "), then build the result from the last word to the first. A StringBuilder is the tidy way to join them.

한국어

단어 순서 뒤집기

공백으로 구분된 단어들의 문장이 주어졌을 때, 반대 순서로 단어를 반환합니다: the quick brown → brown quick the. s.split(" ")로 공백 기준으로 쪼갠 후, 마지막 단어부터 첫 번째单词依次构建结果。A StringBuilder is the tidy way to join them.

Log in or create account · ⁨로그인 또는 계정 만들기⁩

IGCSE, A-Level & AP