Quick Overview

Sort a string containing only S, M, and L into size order in linear time. Extend the discussion to custom token orderings, unknown-size behavior, empty inputs, and a million-character performance bound.

Sort a String of Clothing Sizes

Company: Uber

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: easy

Interview Round: Technical Screen

Overview: Sort a string containing only S, M, and L into size order in linear time. Extend the discussion to custom token orderings, unknown-size behavior, empty inputs, and a million-character performance bound.

Read the full Uber Software Engineer interview experience this question came from

Loading…