![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
普通模拟
文章平均质量分 73
决定要好好毒树的Lucifer
这个作者很懒,什么都没留下…
展开
-
LeetCode 393 - 编码验证
题目链接https://leetcode-cn.com/problems/utf-8-validation/题目:Given an integer array data representing the data, return whether it is a valid UTF-8 encoding.A character in UTF8 can be from 1 to 4 bytes long, subjected to the following rules:For a 1-byte c原创 2022-03-13 20:36:30 · 7800 阅读 · 0 评论 -
LeetCode 41 - 缺失的第一个正数
题目链接https://leetcode-cn.com/problems/first-missing-positive/题目:Given an unsorted integer array nums, return the smallest missing positive integer.You must implement an algorithm that runs in O(n) time and uses constant extra space.Example 1:Inpu原创 2022-03-13 18:37:12 · 1206 阅读 · 0 评论 -
LeetCode 38 - 外观数列
题目链接https://leetcode-cn.com/problems/count-and-say/题目:给定一个正整数 n ,输出外观数列的第 n 项。「外观数列」是一个整数序列,从数字 1 开始,序列中的每一项都是对前一项的描述。你可以将其视作是由递归公式定义的数字字符串序列:countAndSay(1) = "1"countAndSay(n) 是对 countAndSay(n-1) 的描述,然后转换成另一个数字字符串。前五项如下:1. 12. 113....原创 2022-03-11 19:19:18 · 67 阅读 · 0 评论 -
LeetCode 23 - 合并有序链表(困难链表)
题目链接https://leetcode-cn.com/problems/merge-k-sorted-lists/题目:You are given an array of k linked-lists lists, each linked-list is sorted in ascending order.Merge all the linked-lists into one sorted linked-list and return it.Example 1:Input: lists原创 2022-03-11 15:47:50 · 589 阅读 · 0 评论 -
LeetCode 27 - 移除元素(简单)
题目链接https://leetcode-cn.com/problems/remove-element/submissions/题目:Given an integer array nums and an integer val, remove all occurrences of val in nums in-place. The relative order of the elements may be changed.Since it is impossible to change the le原创 2022-03-10 10:08:46 · 6313 阅读 · 0 评论 -
LeetCode 26 - 删除有序数组的重复元素(简单)
题目链接https://leetcode-cn.com/problems/remove-duplicates-from-sorted-array/题目:Given an integer array nums sorted in non-decreasing order, remove the duplicates in-place such that each unique element appears only once. The relative order of the elements sho原创 2022-03-10 09:58:27 · 166 阅读 · 0 评论