1037. Valid Boomerang Easy
1/**
2 * [1037] Valid Boomerang
3 *
4 * 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.
5 * A boomerang is a set of three points that are all distinct and not in a straight line.
6 *
7 * Example 1:
8 * Input: points = [[1,1],[2,3],[3,2]]
9 * Output: true
10 * Example 2:
11 * Input: points = [[1,1],[2,2],[3,3]]
12 * Output: false
13 *
14 * Constraints:
15 *
16 * points.length == 3
17 * points[i].length == 2
18 * 0 <= xi, yi <= 100
19 *
20 */
21pub struct Solution {}
22
23// problem: https://leetcode.com/problems/valid-boomerang/
24// discuss: https://leetcode.com/problems/valid-boomerang/discuss/?currentPage=1&orderBy=most_votes&query=
25
26// submission codes start here
27
28impl Solution {
29 pub fn is_boomerang(points: Vec<Vec<i32>>) -> bool {
30 false
31 }
32}
33
34// submission codes end
35
36#[cfg(test)]
37mod tests {
38 use super::*;
39
40 #[test]
41 fn test_1037() {
42 }
43}
44
Back
© 2025 bowen.ge All Rights Reserved.