
算法
子为空
这个作者很懒,什么都没留下…
展开
-
Leetcode cn 解析布尔表达式
给你一个以字符串形式表述的 布尔表达式(boolean) expression,返回该式的运算结果。有效的表达式需遵循以下约定:“t”,运算结果为 True“f”,运算结果为 False“!(expr)”,运算过程为对内部表达式 expr 进行逻辑 非的运算(NOT)“&(expr1,expr2,…)”,运算过程为对 2 个或以上内部表达式 expr1, expr2, … 进行逻辑 与的运算(AND)“|(expr1,expr2,…)”,运算过程为对 2 个或以上内部表达式 expr1原创 2021-03-28 15:11:43 · 630 阅读 · 0 评论 -
LeetCode 1232. Check If It Is a Straight Line
You are given an array coordinates, coordinates[i] = [x, y], where [x, y] represents the coordinate of a point. Check if these points make a straight line in the XY plane.Example 1:Input: coordinates = [[1,2],[2,3],[3,4],[4,5],[5,6],[6,7]]Output: tru原创 2020-07-07 22:41:29 · 330 阅读 · 0 评论