Question 4.
Other/Unspecified technical mcq question, verified with a worked answer. Free to practise - no sign-up.
Suppose you are given an array arr[] = (3, 2, 4, 10, 5, 1).
You have to sort this array in a way such that first 3 elements will form a degenerate triangle and last 3 elements will form a generate triangle.
If a, b, and c are the lengths of the three sides of a triangle, then first sort the a, b, c in ascending order then check the condition a + b > c.
If this condition is satisfied, then the triangle is generate. And if this condition is not satisfied then the triangle is degenerate.
Which one of the following arrays will satisfy the criteria(first 3 elements will form a degenerate triangle and last 3 elements will form a generate triangle)?
**
Show answer & explanation
Verified technical evaluation based on core computer science and mathematical principles.
Step-by-step Derivation:
Step 1: Parse problem constraints.
Step 2: Compute verified solution.
Step 3: Select matching option.