← All problemsSign in

Length Sort

Given a sequence of words, print them out from the longest word to the shortest word. In the event the number of letters are the same, print the word that appeared in the sequence first. The number of words are not more than $1000$ and its length not exceeding $10000$. ### Input - Input consists of a single integer, $n$. $n$ denotes the number of words in the sequence provided. - After the first

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start