当前位置:网站首页>力扣1037. 有效的回旋镖
力扣1037. 有效的回旋镖
2022-07-06 17:22:00 【秀强】
题目
给定一个数组 points ,其中 points[i] = [xi, yi] 表示 X-Y 平面上的一个点,如果这些点构成一个 回旋镖 则返回 true 。
回旋镖 定义为一组三个点,这些点 各不相同 且 不在一条直线上 。
来源:力扣(LeetCode)
链接:https://leetcode.cn/problems/valid-boomerang
向量叉乘

代码
class Solution {
public boolean isBoomerang(int[][] points) {
// 向量叉乘
return (points[0][0] - points[1][0]) * (points[1][1] - points[2][1]) - (points[0][1] - points[1][1]) * (points[1][0] - points[2][0]) != 0;
}
}
边栏推荐
- Grc: personal information protection law, personal privacy, corporate risk compliance governance
- [HFCTF2020]BabyUpload session解析引擎
- Deeply explore the compilation and pile insertion technology (IV. ASM exploration)
- Fastdfs data migration operation record
- View remote test data and records anytime, anywhere -- ipehub2 and ipemotion app
- Learning notes 5: ram and ROM
- Linear algebra of deep learning
- 深度学习简史(二)
- Advantages and disadvantages of code cloning
- There is an error in the paddehub application
猜你喜欢

ESP Arduino (IV) PWM waveform control output

「精致店主理人」青年创业孵化营·首期顺德场圆满结束!

筑梦数字时代,城链科技战略峰会西安站顺利落幕

第四篇,STM32中断控制编程

Js+svg love diffusion animation JS special effects

Dell Notebook Periodic Flash Screen Fault

Activereportsjs 3.1 Chinese version | | | activereportsjs 3.1 English version

【JVM调优实战100例】04——方法区调优实战(上)

Part IV: STM32 interrupt control programming
![[software reverse - solve flag] memory acquisition, inverse transformation operation, linear transformation, constraint solving](/img/16/71692f4cf89b7dc0fe62946e59ecd1.png)
[software reverse - solve flag] memory acquisition, inverse transformation operation, linear transformation, constraint solving
随机推荐
Part VI, STM32 pulse width modulation (PWM) programming
Distributed cache
建立自己的网站(17)
用tkinter做一个简单图形界面
【JokerのZYNQ7020】AXI_ EMC。
Deep learning framework TF installation
Batch obtain the latitude coordinates of all administrative regions in China (to the county level)
[牛客] B-完全平方数
动态规划思想《从入门到放弃》
Informatics Orsay Ibn YBT 1172: find the factorial of n within 10000 | 1.6 14: find the factorial of n within 10000
Maidong Internet won the bid of Beijing life insurance to boost customers' brand value
【批处理DOS-CMD命令-汇总和小结】-字符串搜索、查找、筛选命令(find、findstr),Find和findstr的区别和辨析
5种不同的代码相似性检测,以及代码相似性检测的发展趋势
新手如何入门学习PostgreSQL?
Learn to use code to generate beautiful interface documents!!!
OSPF configuration command of Huawei equipment
Cause of handler memory leak
[force buckle]41 Missing first positive number
Lombok makes ⽤ @data and @builder's pit at the same time. Are you hit?
There is an error in the paddehub application