feat: 2025-10-23打卡

This commit is contained in:
wu xiangkai
2025-10-23 16:32:13 +08:00
parent 59f245dda7
commit f06095ad7e
9 changed files with 378 additions and 0 deletions

25
1037.valid-boomerang.java Normal file
View File

@@ -0,0 +1,25 @@
/*
* @lc app=leetcode id=1037 lang=java
*
* [1037] Valid Boomerang
*/
// @lc code=start
class Solution {
/**
* y1 / x1 = y0 / x0
* x0*y1 = x1*y0
*
* @param points
* @return
*/
public boolean isBoomerang(int[][] points) {
int x0 = points[1][0] - points[0][0];
int y0 = points[1][1] - points[0][1];
int x1 = points[2][0] - points[0][0];
int y1 = points[2][1] - points[0][1];
return x0 * y1 != x1 * y0;
}
}
// @lc code=end