![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
核桃仁ht
这个作者很懒,什么都没留下…
展开
-
206. Reverse Linked List
Reverse Linked List Given the head of a singly linked list, reverse the list, and return the reversed list. Example 1: Input: head = [1,2,3,4,5] Output: [5,4,3,2,1] Example 2: Input: head = [1,2] Output: [2,1] Example 3: Input: head = [] Output: [] Constra原创 2021-10-12 14:36:05 · 61 阅读 · 0 评论 -
21. Merge Two Sorted Lists
Merge Two Sorted Lists Merge two sorted linked lists and return it as a sorted list. The list should be made by splicing together the nodes of the first two lists. Example 1: Input: l1 = [1,2,4], l2 = [1,3,4] Output: [1,1,2,3,4,4] Example 2: Input: l1 = []原创 2021-10-11 15:06:36 · 62 阅读 · 0 评论 -
141. Linked List Cycle
Linked List Cycle Given head, the head of a linked list, determine if the linked list has a cycle in it. There is a cycle in a linked list if there is some node in the list that can be reached again by continuously following the next pointer. Internally, p原创 2021-10-09 10:22:56 · 62 阅读 · 0 评论 -
451. Sort Characters By Frequency
Sort Characters By Frequency Given a string s, sort it in decreasing order based on the frequency of the characters. The frequency of a character is the number of times it appears in the string. Return the sorted string. If there are multiple answers, retu原创 2021-09-27 11:21:46 · 54 阅读 · 0 评论 -
387. First Unique Character in a String
First Unique Character in a String Given a string s, find the first non-repeating character in it and return its index. If it does not exist, return -1. Example 1: Input: s = “leetcode” Output: 0 Example 2: Input: s = “loveleetcode” Output: 2 Example 3: In原创 2021-09-24 17:58:40 · 95 阅读 · 0 评论