【leetcode】题解
leetcode简要题解
fisty
hi
展开
-
【leetcode】111. Minimum Depth of Binary Tree
Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.Note: A leaf is a node with no childre...原创 2018-05-19 17:04:23 · 242 阅读 · 0 评论 -
【leetcode】 75. Sort Colors
Given an array with n objects colored red, white or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the order red, white and blue.Here, we will use the in...原创 2018-05-15 16:35:07 · 218 阅读 · 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 at a...原创 2018-05-04 17:42:41 · 412 阅读 · 0 评论 -
【leetcode 】 57 Insert Interval
Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals were initially sorted according to their start times.Examp...原创 2018-05-02 14:43:24 · 205 阅读 · 0 评论 -
【leetcode】55. Jump Game 动态规划解法
55. Jump GameGiven an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position.Determ...原创 2018-04-19 16:34:32 · 1177 阅读 · 1 评论 -
【leetcode】No.56. Merge Intervals 区间合并 题解
Given a collection of intervals, merge all overlapping intervals.Example 1:Input: [[1,3],[2,6],[8,10],[15,18]] Output: [[1,6],[8,10],[15,18]] Explanation: Since intervals [1,3] and [2,6] overlap...原创 2018-04-26 17:05:24 · 259 阅读 · 0 评论