mediumArraysPattern: Merge Sort / Quick Sort

Capacity Sorted Tables Solution

Problem Statement

You are given a list of integers representing table capacities. Sort these table capacities in ascending order while maintaining their original group order as much as possible.

Constraints

  • Input list can be empty
  • Each table's capacity is a positive integer
Time: O(n log n) Space: O(n)
Analyze constraints and compute optimal solutions step-by-step.

Run, Test & Submit Code

Ready to practice this challenge? Launch our interactive compilation environment with compiler validation.

Solve on Interactive Workspace

Tested Solutions

No solution code is currently loaded.
Complete this code in the workspace editor.