![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LeetCode
Tiansheng_Wang
这个作者很懒,什么都没留下…
展开
-
91. Decode Ways
A message containing letters from A-Z is being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given a non-empty string containing only digits, determin...原创 2018-07-23 21:40:36 · 113 阅读 · 0 评论 -
109. Convert Sorted List to Binary Search Tree
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.For this problem, a height-balanced binary tree is defined as a binary tree in which the de...原创 2018-07-13 15:27:36 · 115 阅读 · 0 评论 -
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 following two linked lists:A: a1 → a2 ↘ ...原创 2018-07-19 19:28:05 · 87 阅读 · 0 评论 -
206. Reverse Linked List
1.iteratively(迭代)迭代是不停的重复,其目的通常是为了逼近所需目标或结果。每一次对过程的重复称为一次“迭代”,而每一次迭代得到的结果会作为下一次迭代的初始值。2.recursively(递归)一个过程或函数在其定义或说明中有直接或间接调用自身的一种方法。迭代方法:// Recursiveclass Solution {public: ListNode...原创 2018-07-19 20:06:26 · 90 阅读 · 0 评论 -
237. Delete Node in a Linked List
Write a function to delete a node (except the tail) in a singly linked list, given only access to that node.Given linked list -- head = [4,5,1,9], which looks like following: 4 -> 5 -> 1...原创 2018-07-20 14:52:40 · 66 阅读 · 0 评论 -
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 the node number and not the value in the nodes.You should try to do it i...原创 2018-07-20 15:25:51 · 94 阅读 · 0 评论 -
430. Flatten a Multilevel Doubly Linked List
You are given a doubly linked list which in addition to the next and previous pointers, it could have a child pointer, which may or may not point to a separate doubly linked list. These child lists...原创 2018-07-20 15:49:35 · 548 阅读 · 0 评论 -
725. Split Linked List in Parts
Given a (singly) linked list with head node root, write a function to split the linked list into k consecutive linked list "parts".The length of each part should be as equal as possible: no two part...原创 2018-07-20 23:52:13 · 86 阅读 · 0 评论 -
817. Linked List Components
We are given head, the head node of a linked list containing unique integer values.We are also given the list G, a subset of the values in the linked list.Return the number of connected comp...原创 2018-07-21 00:14:02 · 100 阅读 · 0 评论