Maximum Subarray 描述 分析 动规 思路5 相关题目 Maximum Subarray 描述 Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For exam...
Set Matrix Zeroes 描述 分析 代码1 代码2 Set Matrix Zeroes 描述 Given a m × n matrix, if an element is 0, set its entire row and column to 0. Do it in place. Follow up : Did you u...
Scramble String 描述 分析 递归 动规 递归+剪枝 备忘录法 Scramble String 描述 Given a string s1 , we may represent it as a binary tree by partitioning it to two non-empty substrings recurs...
Valid Anagram 描述 分析 代码 Valid Anagram 描述 Given two strings s and t , write a function to determine if t is an anagram of s . For example, s = "anagram", t = "nagaram", ...
第 1 章 介绍 第 1 章 介绍 Chapter 1 Introduction(It’s All About Complexity) Writing computer software is one of the purest creative activities in the history of the human race. Pro...
Reverse Nodes in k-Group 描述 分析 递归版 迭代版 相关题目 Reverse Nodes in k-Group 描述 Given a linked list, reverse the nodes of a linked list k at a time and return its modified list....
Spiral Matrix 描述 分析 解法1 迭代 解法2 递归 相关题目 Spiral Matrix 描述 Given a matrix of m × n elements (m rows, n columns), return all elements of the matrix in spiral order. For ...