
leetcode刷题之路
agaoq
这个作者很懒,什么都没留下…
展开
-
leetcode 120. Triangle
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For example, given the following triangle [ [2], [3...原创 2018-08-17 21:42:15 · 218 阅读 · 0 评论 -
leetcode 5. Longest Palindromic Substring
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example 1: Input: "babad" Output: "bab" Note: "aba" is also a valid answer. Ex...原创 2018-09-02 07:57:39 · 136 阅读 · 0 评论 -
leetcode 3 Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters. Example 1: Input: "abcabcbb" Output: 3 Explanation: The answer is "abc", which the length is 3. Example 2:...原创 2018-09-02 07:21:30 · 123 阅读 · 0 评论 -
leetcode 152. Maximum Product Subarray
Given an integer array nums, find the contiguous subarray within an array (containing at least one number) which has the largest product. Example 1: Input: [2,3,-2,4] Output: 6 Explanation: [2,3]...原创 2018-08-20 21:51:01 · 125 阅读 · 0 评论 -
leetcode 139. Word Break
Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can be segmented into a space-separated sequence of one or more dictionary words. Note: ...原创 2018-08-20 21:32:21 · 263 阅读 · 0 评论 -
leetcode 91. Decode Ways
A message containing letters from A-Z is being encoded to numbers using the following mapping: ‘A’ -> 1 ‘B’ -> 2 … ‘Z’ -> 26 Given a non-empty string containing only digits,...原创 2018-08-16 22:00:57 · 144 阅读 · 0 评论 -
leetcode 64. Minimum Path Sum
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. Note: You can only move either down or right...原创 2018-08-16 19:58:05 · 117 阅读 · 0 评论 -
leetcode 63. Unique Paths II
引用块内容原创 2018-08-16 00:00:13 · 111 阅读 · 0 评论 -
leetcode 62. Unique Paths
A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below). The robot can only move either down or right at any point in time. The robot is trying to reach t...原创 2018-08-15 23:14:12 · 200 阅读 · 0 评论 -
leetcode 241. Different Ways to Add Parentheses
Given a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. The valid operators are +, - and *. Example 1: ...原创 2018-08-15 20:52:09 · 148 阅读 · 0 评论 -
Chapter 9 函数(Functions)
目录要点总结1. 函数2. 递归3. 查找地址: &运算符复习题 要点总结 1. 函数 函数是完成特定任务的独立程序代码单元。 使用函数的意义: 可以省去编写重复代码的苦差。 让程序更加模块化,从而提高可读性,方便后期的修改和完善。 分析程序 函数原型(function prototype) 告诉编译器某函数的类型;(一般而言,它指明了函数的返回值类型和函数接受的参数类型) 函数...原创 2018-10-18 12:01:37 · 170 阅读 · 0 评论