Hiring process8 levels
  1. 1 IQ Test
  2. 2 Additional Online Test (If Required)
  3. 3 Office Interview with Hiring Manager
  4. 4 Unpaid Test Task (Motivation Check)
  5. 5 Paid Test Task and Follow-Up Interview
  6. 6 Iterative Paid Test Tasks
  7. 7 Office Verification
  8. 8 Final Interview with the Founder

Problems > Can It Be a Triangle > Editorial

Can It Be a Triangle — Solution & Editorial

Back to the Problem

Sort the sides; a triangle exists iff the two smaller sides sum to strictly more than the largest.

Complexity: O(1)

Watch out: A + B can overflow 64 bits only if you add three values — compare two at a time, and use strict inequality.