Skip to content

Practice Valid Boomerang

Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.

Easy#1037
LeetCode Problem

Valid Boomerang

Problem Statement

Given an array points where points[i] = [xi, yi] represents a point on the X-Y plane, return true if these points are a boomerang. A boomerang is a set of three points that are all distinct and not in a straight line.

Source: Valid Boomerang on LeetCode. Use the original task for its coding environment and submissions.

Examples

# Example 1

Input
points = [[1,1],[2,3],[3,2]]
Output
true

# Example 2

Input
points = [[1,1],[2,2],[3,3]]
Output
false

Constraints

points.length == 3
points[i].length == 2
0 <= xi, yi <= 100

Related LeetCode Problems

Practice more problems similar to Valid Boomerang.

Review your practice with PhantomCodeAI

After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.