Sort Circles By Area (OOP)

Programming Interview Medium 8 views
Back to Questions

Problem Description

Input provides {x}. Create Circle class with area() and sort circles by area ascending. Output sorted radii.

Input Format

First line n. Second line n radii.

Output Format

One line sorted radii.

Sample Test Case

Input:
4 3 1 2 2
Output:
1 2 2 3

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next