摘要:
"148. Sort List" Sort a linked list in O(n log n) time using constant space complexity. Solution 利用归并排序的思想 Definition for singly linked list. class Li 阅读全文
摘要:
"160. Intersection of Two Linked Lists" Write a program to find the node at which the intersection of two singly linked lists begins. For example, the 阅读全文
摘要:
"328. Odd Even Linked List" Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about 阅读全文
摘要:
"234. Palindrome Linked List" Given a singly linked list, determine if it is a palindrome. Follow up: Could you do it in O(n) time and O(1) space? 判断一 阅读全文
摘要:
Trie树:字典查找树。 "208. Implement Trie (Prefix Tree)" Implement a trie with , , and methods. Note: You may assume that all inputs are consist of lowercase 阅读全文
摘要:
https://leetcode.com/problems/kth largest element in an array/ Find the kth largest element in an unsorted array. Note that it is the kth largest elem 阅读全文