LeetCode solutions

1115. Valid Boomerang

My accepted C++ solution to LeetCode problem 1115, Valid Boomerang, running in 0ms.

  • Difficulty: Easy
  • C++
  • Runtime 0ms
  • Memory 12.6MB

Read the problem on LeetCode View on GitHub

C++

Accepted on LeetCode — runtime 0ms, memory 12.6MB, accepted 2025-12-27.

cpp
class Solution {
    public:
        bool isBoomerang(vector<vector<int>>& p) {
                return (p[1][0] - p[0][0]) * (p[2][1] - p[0][1]) != (p[2][0] - p[0][0]) * (p[1][1] - p[0][1]);
                    }
                    };

Source