上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 33 下一页
摘要: 地址:https://leetcode-cn.com/problems/number-of-students-doing-homework-at-a-given-time/ <?php /** 1450. 在既定时间做作业的学生人数 给你两个整数数组 startTime(开始时间)和 endTime 阅读全文
posted @ 2020-09-18 10:36 花花妹子。 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/minimum-time-visiting-all-points/ <?php /** 平面上有 n 个点,点的位置用整数坐标表示 points[i] = [xi, yi]。请你计算访问所有这些点需要的最小时间(以秒为单位)。 阅读全文
posted @ 2020-09-18 10:22 花花妹子。 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/matrix-diagonal-sum/ <?php /** 1572. 矩阵对角线元素的和 给你一个正方形矩阵 mat,请你返回矩阵对角线元素的和。 请你返回在矩阵主对角线上的元素和副对角线上且不在主对角线上元素的和。 示例 阅读全文
posted @ 2020-09-17 18:08 花花妹子。 阅读(373) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/delete-node-in-a-linked-list/ <?php /** 237. 删除链表中的节点 请编写一个函数,使其可以删除某个链表中给定的(非末尾)节点。传入函数的唯一参数为 要被删除的节点 。 现有一个链表 -- 阅读全文
posted @ 2020-09-17 18:00 花花妹子。 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/nGK0Fy/ <?php /** LCP 17. 速算机器人 小扣在秋日市集发现了一款速算机器人。店家对机器人说出两个数字(记作 x 和 y),请小扣说出计算指令: "A" 运算:使 x = 2 * x + y; "B" 运算 阅读全文
posted @ 2020-09-17 17:52 花花妹子。 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/defanging-an-ip-address/ <?php /** 1108. IP 地址无效化 给你一个有效的 IPv4 地址 address,返回这个 IP 地址的无效化版本。 所谓无效化 IP 地址,其实就是用 "[.] 阅读全文
posted @ 2020-09-17 17:16 花花妹子。 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/na-ying-bi/ <?php /** * Class Solution * 桌上有 n 堆力扣币,每堆的数量保存在数组 coins 中。我们每次可以选择任意一堆,拿走其中的一枚或者两枚,求拿完所有力扣币的最少次数。 示例 阅读全文
posted @ 2020-09-17 16:42 花花妹子。 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/delete-middle-node-lcci/ <?php /** * 实现一种算法,删除单向链表中间的某个节点(即不是第一个或最后一个节点),假定你只能访问该节点。 * * * * 示例: * * 输入:单向链表a->b-> 阅读全文
posted @ 2020-09-17 16:31 花花妹子。 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/shuffle-the-array/ <?php /** 1470. 重新排列数组 给你一个数组 nums ,数组中有 2n 个元素,按 [x1,x2,...,xn,y1,y2,...,yn] 的格式排列。 请你将数组按 [x1 阅读全文
posted @ 2020-09-17 15:54 花花妹子。 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/kids-with-the-greatest-number-of-candies/ <?php /** 1431. 拥有最多糖果的孩子 给你一个数组 candies 和一个整数 extraCandies ,其中 candies[ 阅读全文
posted @ 2020-09-17 15:41 花花妹子。 阅读(98) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 33 下一页