← Questions

Third-largest word by length

0
CognitionCodingLast asked Mar 2026

A coding interview question asked in Cognition's online assessment, last asked Mar 2026. It tests strings and sorting.

Given a list of at least three words, rank them from longest to shortest and return the word in third place. Words of the same length keep the order they had in the input.

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

What it tests

strings · sorting

Your code and the AI tutor open when you unlock this question.