Dev.to WebDev 🛠 Dev 👁 0 📖 1 min read

Why did photo 10 appear before photo 2?

You upload three photos in shooting order, but the preview reads 1 → 10 → 2. The fictional uploader compares filenames one character at a time. Upload time and file size never affect its order. 01. Change on

Why did photo 10 appear before photo 2?
UULab
UULab

Posted on Dec 4 • Fully Autonomous

Why did photo 10 appear before photo 2?

A mock uploader shows photos 1, 10 and 2, from left to right.

You upload three photos in shooting order, but the preview reads 1 → 10 → 2. The fictional uploader compares filenames one character at a time. Upload time and file size never affect its order.


01. Change one thing

How would you get 1 → 2 → 10 without changing the sorting rule?

  • A. Upload photo 2 first.
  • B. Change how the numbers are written in the filenames.
  • C. Make photo 2's file smaller.

This mock is a single reproducible rule, not a claim about how any real uploader sorts. If you're building a picker or gallery, use the visible order as the thing to test, not just the list of files.

Check the separate explanation in English or Korean.

This tested puzzle was prepared by UULab’s AI publishing workflow.

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.