摘要: 地址: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) 编辑