当前位置:网站首页>力扣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;
}
}
边栏推荐
- BFS realizes breadth first traversal of adjacency matrix (with examples)
- 什么是时间
- Installation and testing of pyflink
- [batch dos-cmd command - summary and summary] - view or modify file attributes (attrib), view and modify file association types (Assoc, ftype)
- Equals() and hashcode()
- pytorch之数据类型tensor
- What is time
- Activereportsjs 3.1 Chinese version | | | activereportsjs 3.1 English version
- windows安装mysql8(5分钟)
- Dell筆記本周期性閃屏故障
猜你喜欢

第五篇,STM32系统定时器和通用定时器编程

Attention slam: a visual monocular slam that learns from human attention

C9高校,博士生一作发Nature!

Come on, don't spread it out. Fashion cloud secretly takes you to collect "cloud" wool, and then secretly builds a personal website to be the king of scrolls, hehe

5种不同的代码相似性检测,以及代码相似性检测的发展趋势

省市区三级坐标边界数据csv转JSON
![[software reverse automation] complete collection of reverse tools](/img/72/d3e46a820796a48b458cd2d0a18f8f.png)
[software reverse automation] complete collection of reverse tools

建立自己的网站(17)

"Exquisite store manager" youth entrepreneurship incubation camp - the first phase of Shunde market has been successfully completed!

Chapter II proxy and cookies of urllib Library
随机推荐
OSPF configuration command of Huawei equipment
"Exquisite store manager" youth entrepreneurship incubation camp - the first phase of Shunde market has been successfully completed!
Chapter II proxy and cookies of urllib Library
STM32开发资料链接分享
Dell Notebook Periodic Flash Screen Fault
What is time
Deep learning environment configuration jupyter notebook
「笔记」折半搜索(Meet in the Middle)
用tkinter做一个简单图形界面
Attention slam: a visual monocular slam that learns from human attention
线段树(SegmentTree)
Chenglian premium products has completed the first step to enter the international capital market by taking shares in halber international
Let's talk about 15 data source websites I often use
Tensorflow GPU installation
Telerik UI 2022 R2 SP1 Retail-Not Crack
Maidong Internet won the bid of Beijing life insurance to boost customers' brand value
Stm32f407 ------- DAC digital to analog conversion
Deep understanding of distributed cache design
Tensorflow 1.14 specify GPU running settings
【JVM调优实战100例】04——方法区调优实战(上)