上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 33 下一页
摘要: 地址:https://leetcode-cn.com/problems/array-partition-i/ <?php /** 给定长度为 2n 的数组, 你的任务是将这些数分成 n 对, 例如 (a1, b1), (a2, b2), ..., (an, bn) ,使得从1 到 n 的 min(a 阅读全文
posted @ 2020-09-27 14:04 花花妹子。 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/is-unique-lcci/ <?php /** 实现一个算法,确定一个字符串 s 的所有字符是否全都不同。 示例 1: 输入: s = "leetcode" 输出: false 示例 2: 输入: s = "abc" 输出: 阅读全文
posted @ 2020-09-27 13:54 花花妹子。 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/unique-number-of-occurrences/ <?php /** 给你一个整数数组 arr,请你帮忙统计数组中每个数的出现次数。 如果每个数的出现次数都是独一无二的,就返回 true;否则返回 false。 示例 阅读全文
posted @ 2020-09-27 13:45 花花妹子。 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/find-words-that-can-be-formed-by-characters/ <?php /** 给你一份『词汇表』(字符串数组) words 和一张『字母表』(字符串) chars。 假如你可以用 chars 中的 阅读全文
posted @ 2020-09-27 11:25 花花妹子。 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/majority-element/ <?php /** 给定一个大小为 n 的数组,找到其中的多数元素。多数元素是指在数组中出现次数大于 ⌊ n/2 ⌋ 的元素。 你可以假设数组是非空的,并且给定的数组总是存在多数元素。 示例  阅读全文
posted @ 2020-09-25 15:58 花花妹子。 阅读(72) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/reverse-linked-list/ <?php /** 反转一个单链表。 示例: 输入: 1->2->3->4->5->NULL 输出: 5->4->3->2->1->NULL */ /** * Definition fo 阅读全文
posted @ 2020-09-25 15:49 花花妹子。 阅读(72) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/destination-city/ <?php /** 1436. 旅行终点站 给你一份旅游线路图,该线路图中的旅行线路用数组 paths 表示,其中 paths[i] = [cityAi, cityBi] 表示该线路将会从 c 阅读全文
posted @ 2020-09-18 18:20 花花妹子。 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/lian-biao-zhong-dao-shu-di-kge-jie-dian-lcof/ <?php /** 剑指 Offer 22. 链表中倒数第k个节点 输入一个链表,输出该链表中倒数第k个节点。为了符合大多数人的习惯,本 阅读全文
posted @ 2020-09-18 17:27 花花妹子。 阅读(55) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/split-a-string-in-balanced-strings/ <?php /** 在一个「平衡字符串」中,'L' 和 'R' 字符的数量是相同的。 给出一个平衡字符串 s,请你将它分割成尽可能多的平衡字符串。 返回可以 阅读全文
posted @ 2020-09-18 14:30 花花妹子。 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/shuffle-string/ <?php /** 1528. 重新排列字符串 给你一个字符串 s 和一个 长度相同 的整数数组 indices 。 请你重新排列字符串 s ,其中第 i 个字符需要移动到 indices[i] 阅读全文
posted @ 2020-09-18 11:41 花花妹子。 阅读(99) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 33 下一页