Tap here to switch tabs
Problem
Submissions

Problem: Angles of a Triangle

Try to solve the Angles of a Triangle problem.

Statement

Given an integer array sides of length 33 representing the lengths of the sides of a triangle, calculate the three internal angles of the triangle in degrees.

If the given side lengths cannot form a valid triangle with a positive area, return an empty array.

Otherwise, return an array containing the three internal angles in degrees, sorted in nondecreasing order.

Constraints:

  • sides.length =3= 3

  • 1≤1 \leq sides[i] ≤1000\leq 1000

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Angles of a Triangle

Try to solve the Angles of a Triangle problem.

Statement

Given an integer array sides of length 33 representing the lengths of the sides of a triangle, calculate the three internal angles of the triangle in degrees.

If the given side lengths cannot form a valid triangle with a positive area, return an empty array.

Otherwise, return an array containing the three internal angles in degrees, sorted in nondecreasing order.

Constraints:

  • sides.length =3= 3

  • 1≤1 \leq sides[i] ≤1000\leq 1000