Two-column extremes report
The op sorts items by length twice (descending for longest, ascending for shortest) and slices the top N from each. Output format: `Longest N:` header, then each item on its own line with two-space indent. Same structure for the `Shortest N:` section. With N=1, headers become `Longest:` / `Shortest:` (no number).
Show length (default on) appends `(N)` to each item with its character count. Turn off for cleaner output when you just want the item text.
Items can appear in BOTH sections if the list is short - with 5 items and N=3, there is overlap. For distinct longest/shortest with no overlap, choose N ≤ floor(list length / 2).
How to use find longest and shortest list items
- 1Paste your list into the input panel
- 2Set Top N each - default is 3 (shows 3 longest + 3 shortest)
- 3Toggle Show length to append character counts in parentheses
- 4For length-sorted output instead of extremes, use Sort by length
- 5For statistics summary, use List analysis
Keyboard shortcuts
Drive ListShift without touching the mouse.
What this tool actually does
Top-N extremes report, two sections.
Top N longest and top N shortest
Computes two slices from the length-sorted list: first N from descending sort (longest), first N from ascending sort (shortest). Both use stable sort - ties preserve original order.
Two-section output
Format: `Longest N:\n item1 (len)\n item2 (len)\n...\nShortest N:\n item1 (len)\n...`. With N=1, headers drop the number suffix.
Show length toggle (default on)
Appends ` (N)` to each item with its character count. Turn off for unadorned item text.
Overlap on short lists
With 5 items and N=3, the same item can appear in both sections. Pick N ≤ floor(length / 2) for non-overlapping output.
Blank lines skipped
Whitespace-only lines are filtered before analysis - they do not count as "shortest" (a zero-length tier).
Worked example
Default N=3, Show length on. `apple` (5) appears in both sections due to overlap on 5-item input.
apple banana kiwi watermelon pear
Longest 3: watermelon (10) banana (6) apple (5) Shortest 3: kiwi (4) pear (4) apple (5)
Settings reference
How each option shapes the output using the sample above.
| Setting | What it does | Effect on the sample |
|---|---|---|
| Top N each: 3 (default), Show length: on | Top 3 longest + top 3 shortest with counts | See example above - overlap on `apple` |
| Top N each: 1 | Just the extremes | `Longest:\n watermelon (10)\nShortest:\n kiwi (4)` |
| Show length: off | Removes the ` (N)` suffix | Items listed without character counts |
| Ties (automatic) | Preserve original input order | `kiwi` before `pear` - both length 4, kiwi appeared first |