Question bank › Arrays
Dsa Arrays Hard

Balanced Triangle Check

You are given an array of integers representing the lengths of sticks. Determine if any three lengths can form a balanced triangle (a triangle where each side is less than the sum of the other two sides). Print 'YES' if such a triangle exists or 'NO' otherwise. The input consists of one line containing space-separated integers. Example: Input: 3 4 5 7 Output: YES

Key concepts

arrayscombinatoricssorting

Practise this out loud — free

Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.

🎙 Practise this question now
Part of InterviewLab's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.