20. Valid Parentheses 题目 Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determ…
分类:LeetCode题目解答
[LeetCode] Clone Graph 无向图的复制
Clone an undirected graph. Each node in the graph contains a label and a list of its nei…
LeetCode | Sort Colors
题目: Given an array with n objects colored red, white or blue, sort them so that objects of the same …
LeetCode | Populating Next Right Pointers in Each Node II
题目: Follow up for problem “Populating Next Right Pointers in Each Node“. What if the given tree co…
82. Remove Duplicates from Sorted List II
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from t…
92. Reverse Linked List II
92. Reverse Linked List II 题目 Reverse a linked list from position m to n. Do it in-place and in one-pass. For …
82. Remove Duplicates from Sorted List II && i
题目 83. Remove Duplicates from Sorted List Given a sorted linked list, delete all duplicates such that each ele…
[LeetCode] Populating Next Right Pointers in Each Node II 每个节点的右向指针之二
Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; …
[LeetCode] Reorder List 链表重排序
Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You…
LeetCode 064 Minimum Path Sum
题目描述 Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which mini…
[Leetcode] Set Matrix Zeroes 矩阵置零
Set Matrix Zeroes Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place…
[Leetcode] Reverse Bits 反转位
Reverse Bits Reverse bits of a given 32 bits unsigned integer. For example, given input 43261596 (represented …