![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LeetCode
郝春雨
大数据开发萌新,吉他入门小渣渣,吃货并一直努力地减肥着,永远怀着一颗成为大神的心,希望在智能的这几年不虚度~~~
展开
-
【LeetCode】566.Reshape the Matrix解题报告
【LeetCode】566.Reshape the Matrix解题报告tags: Array 题目地址:https://leetcode.com/problems/reshape-the-matrix/#/description 题目描述:> You’re given a matrix represented by a two-dimensional array, and two posi原创 2017-05-25 16:13:41 · 473 阅读 · 0 评论 -
【LeetCode】1.Two Sum解题报告
【LeetCode】Two Sum解题报告tags: Array HashTable题目地址:https://leetcode.com/problems/two-sum/#/description 题目描述: Given an array of integers, return indices of the two numbers such that they add up to a sp原创 2017-05-25 00:44:42 · 278 阅读 · 0 评论 -
【LeetCode】561.Array Partition I解题报告
【LeetCode】561.Array Partition I解题报告tags: Array 题目地址:https://leetcode.com/problems/array-partition-i/#/description 题目描述: Given an array of 2n integers, your task is to group these integers into n p原创 2017-05-25 16:42:35 · 492 阅读 · 0 评论 -
【LeetCode】217.Contains Duplicate解题报告
【LeetCode】217.Contains Duplicate解题报告tags: Array 题目地址:https://leetcode.com/problems/contains-duplicate/#/description 题目描述: Given an array of integers, find if the array contains any duplicates. You原创 2017-06-04 19:03:12 · 226 阅读 · 0 评论 -
【LeetCode】283.Move Zeroes解题报告
【LeetCode】283.Move Zeroes解题报告tags: Array 题目地址:https://leetcode.com/problems/move-zeroes/#/description 题目描述: Given an array nums, write a function to move all 0’s to the end of it while maintaining原创 2017-06-02 21:18:17 · 262 阅读 · 0 评论 -
【LeetCode】495.Teemo Attacking解题报告
【LeetCode】495.Teemo Attacking解题报告tags: Array 题目地址:https://leetcode.com/problems/teemo-attacking/#/description 题目描述: In LLP world, there is a hero called Teemo and his attacking can make his enemy原创 2017-06-03 11:17:33 · 270 阅读 · 0 评论 -
【LeetCode】268.Missing Number解题报告
【LeetCode】268.Missing Number解题报告tags: Array 题目地址:https://leetcode.com/problems/missing-number/#/description 题目描述: Given an array containing n distinct numbers taken from 0, 1, 2, …, n, find the on原创 2017-06-07 10:56:00 · 254 阅读 · 0 评论 -
【LeetCode】238. Product of Array Except Self解题报告
【LeetCode】238. Product of Array Except Selftags: Array 题目地址:https://leetcode.com/problems/product-of-array-except-self/#/description 题目描述: Given an array of n integers where n > 1, nums, return an原创 2017-06-03 10:32:24 · 329 阅读 · 0 评论 -
【LeetCode】122.Best Time to Buy and Sell Stock II解题报告
【LeetCode】122.Best Time to Buy and Sell Stock II解题报告tags: Array Greedy题目地址:https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/#/description 题目描述: Say you have an array for which the原创 2017-06-03 16:53:22 · 348 阅读 · 0 评论 -
【LeetCode】167.Two Sum II - Input array is sorted解题报告
【LeetCode】167.Two Sum II - Input array is sorted解题报告tags: Array 题目地址:https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/#/description 题目描述: Given an array of integers that is already s原创 2017-06-03 16:35:34 · 232 阅读 · 0 评论 -
【LeetCode】287.Find the Duplicate Number解题报告
【LeetCode】287.Find the Duplicate Number解题报告tags: Array 题目地址:https://leetcode.com/problems/find-the-duplicate-number/#/description题目描述: Given an array nums containing n + 1 integers ...原创 2017-06-07 22:41:54 · 432 阅读 · 0 评论 -
【LeetCode】121.Best Time to Buy and Sell Stock解题报告
【LeetCode】121.Best Time to Buy and Sell Stock解题报告tags: Array 题目地址:https://leetcode.com/problems/best-time-to-buy-and-sell-stock/#/description 题目描述: Say you have an array for which the ith element原创 2017-06-23 10:20:47 · 329 阅读 · 0 评论 -
【LeetCode】62.Unique Paths解题报告
【LeetCode】62.Unique Paths解题报告tags: Array DP题目地址:https://leetcode.com/problems/unique-paths/#/description 题目描述: A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diag原创 2017-06-23 16:24:28 · 381 阅读 · 0 评论 -
【LeetCode】560.Subarray Sum Equals K解题报告
【LeetCode】560.Subarray Sum Equals K解题报告tags: Array 题目地址:https://leetcode.com/problems/subarray-sum-equals-k/tabs/description 题目描述: Given an array of integers and an integer k, you need to find the原创 2017-07-29 17:28:53 · 1625 阅读 · 0 评论 -
【LeetCode】53.Maximum Subarray解题报告
【LeetCode】53.Maximum Subarray解题报告tags: Array 题目地址:https://leetcode.com/problems/maximum-subarray/description/ 题目描述: Find the contiguous subarray within an array (containing at least one number) wh原创 2017-07-29 23:45:22 · 343 阅读 · 0 评论 -
【LeetCode】611.Valid Triangle Number解题报告
【LeetCode】611.Valid Triangle Number解题报告tags: Array 题目地址:https://leetcode.com/problems/valid-triangle-number/description/ 题目描述: Given an array consists of non-negative integers, your task is to cou原创 2017-07-29 23:11:24 · 1727 阅读 · 0 评论 -
【LeetCode】35.Search Insert Position解题报告
【LeetCode】35.Search Insert Position解题报告tags: Array 题目地址:https://leetcode.com/problems/search-insert-position/tabs/description题目描述: Given a sorted array and a target value, return the index if the t原创 2017-07-29 09:33:16 · 216 阅读 · 0 评论 -
【LeetCode】135.Candy(hard)解题报告
【LeetCode】135.Candy(hard)解题报告tags: greedy题目地址:https://leetcode.com/problems/candy/description/ 题目描述: There are N children standing in a line. Each child is assigned a rating value. You...原创 2017-11-06 19:13:26 · 239 阅读 · 0 评论 -
【LeetCode】72.Edit Distance解题报告
【LeetCode】72.Edit Distance解题报告tags: DP String题目地址:https://leetcode.com/problems/edit-distance/description/ 题目描述: Given two words word1 and word2, find the minimum number of steps required to conve原创 2017-10-22 11:04:55 · 183 阅读 · 0 评论 -
【LeetCode】141.Linked List Cycle(easy)解题报告
【LeetCode】141.Linked List Cycle(easy)解题报告tags: Two Pointers Linked List题目地址:https://leetcode.com/problems/linked-list-cycle/description/ 题目描述: Given a linked list, determine if it has a cycle in i原创 2017-10-22 11:14:53 · 223 阅读 · 0 评论 -
【LeetCode】581.Shortest Unsorted Continuous Subarray(easy)解题报告
【LeetCode】581.Shortest Unsorted Continuous Subarray(easy)解题报告题目地址:https://leetcode.com/problems/shortest-unsorted-continuous-subarray/description/ 题目描述: Given an integer array, you need to find on原创 2017-11-07 23:33:54 · 224 阅读 · 0 评论 -
【LeetCode】463.Island Perimeter(easy)解题报告
【LeetCode】463.Island Perimeter(easy)解题报告tags: HashTable 题目地址:https://leetcode.com/problems/island-perimeter/description/ 题目描述: You are given a map in form of a two-dimensional integer grid where 1原创 2017-10-22 18:45:11 · 207 阅读 · 0 评论 -
【LeetCode】382.Linked List Random Node(medium)解题报告
【LeetCode】382.Linked List Random Node(medium)解题报告tags: Reservoir Sampling题目地址:https://leetcode.com/problems/linked-list-random-node/description/ 题目描述: Given a singly linked list, return a random n原创 2017-10-22 20:07:26 · 212 阅读 · 0 评论 -
【LeetCode】464.Can I Win(Medium)解题报告
【LeetCode】464.Can I Win(Medium)解题报告tags: DP Minimax题目地址:https://leetcode.com/problems/can-i-win/description/ 题目描述: In the “100 game,” two players take turns adding, to a running total, any integer原创 2017-11-08 18:42:31 · 1172 阅读 · 0 评论 -
【LeetCode】3.Longest Substring Without Repeating Characters解题报告
【LeetCode】3.Longest Substring Without Repeating Characters解题报告tags: Two Pointers HashTable String题目地址:https://leetcode.com/problems/longest-substring-without-repeating-characters/description/ 题目描述:原创 2017-10-14 22:52:41 · 175 阅读 · 0 评论 -
【LeetCode】606.Construct String from Binary Tree解题报告
【LeetCode】606.Construct String from Binary Tree解题报告tags: String Tree题目地址:https://leetcode.com/problems/construct-string-from-binary-tree/description/ 题目描述: You need to construct a string consists原创 2017-10-14 23:00:14 · 178 阅读 · 0 评论 -
【LeetCode】669.Trim a Binary Search Tree解题报告
【LeetCode】669.Trim a Binary Search Tree解题报告tags: Tree题目地址:https://leetcode.com/problems/trim-a-binary-search-tree/description/ 题目描述: Given a binary search tree and the lowest and highest boundarie原创 2017-10-14 23:07:17 · 195 阅读 · 0 评论 -
【LeetCode】412.Fizz Buzz(easy)解题报告
【LeetCode】412.Fizz Buzz(easy)解题报告题目地址:https://leetcode.com/problems/fizz-buzz/description/ 题目描述: Write a program that outputs the string representation of numbers from 1 to n. But for multipl原创 2017-11-05 00:13:37 · 170 阅读 · 0 评论 -
【LeetCode】10.Regular Expression Matching(hard)解题报告
【LeetCode】10.Regular Expression Matching(hard)解题报告tags: DP String题目地址:https://leetcode.com/problems/regular-expression-matching/description/ 题目描述: Implement regular expression matching with suppor原创 2017-11-05 00:21:09 · 242 阅读 · 0 评论 -
【LeetCode】419.Battleships in a Board(Medium)解题报告
【LeetCode】419.Battleships in a Board解题报告(Medium)题目地址:https://leetcode.com/problems/battleships-in-a-board/description/ 题目描述: Given an 2D board, count how many battleships are in it. The battleship原创 2017-11-05 16:42:36 · 150 阅读 · 0 评论 -
【LeetCode】664.Strange Printer(hard)解题报告
【LeetCode】664.Strange Printer解题报告tags: DP题目地址:https://leetcode.com/problems/strange-printer/description/ 题目描述: There is a strange printer with the following two special requirements: 1. The p原创 2017-11-05 00:05:21 · 371 阅读 · 0 评论 -
【LeetCode】646.Maximum Length of Pair Chain(Medium)解题报告
【LeetCode】646.Maximum Length of Pair Chain(Medium)解题报告题目地址:https://leetcode.com/problems/maximum-length-of-pair-chain/description/ 题目描述: You are given n pairs of numbers. In every pair, the first原创 2017-11-15 09:02:55 · 235 阅读 · 0 评论 -
【LeetCode】6.ZigZag Conversion(Medium)解题报告
【LeetCode】6.ZigZag Conversion(Medium)解题报告题目地址:https://leetcode.com/problems/zigzag-conversion/description/ 题目描述: The string “PAYPALISHIRING” is written in a zigzag pattern on a given number of row原创 2017-11-15 10:42:07 · 178 阅读 · 0 评论 -
【LeetCode】160.Intersection of Two Linked Lists(Easy)解题报告
【LeetCode】160.Intersection of Two Linked Lists(Easy)解题报告题目地址:https://leetcode.com/problems/intersection-of-two-linked-lists/description/ 题目描述: Write a program to find the node at which the interse原创 2017-11-15 23:20:45 · 151 阅读 · 0 评论 -
【LeetCode】698.Partition to K Equal Sum Subsets(Medium)解题报告
【LeetCode】698.Partition to K Equal Sum Subsets(Medium)解题报告题目地址:https://leetcode.com/problems/partition-to-k-equal-sum-subsets/description/ 题目描述: Given an array of integers nums and a positive inte原创 2017-11-22 09:00:51 · 421 阅读 · 0 评论 -
【LeetCode】687.Longest Univalue Path(Easy)解题报告
【LeetCode】687.Longest Univalue Path(Easy)解题报告题目地址:https://leetcode.com/problems/longest-univalue-path/description/ 题目描述: Given a binary tree, find the length of the longest path where each node in原创 2017-11-22 09:39:58 · 716 阅读 · 0 评论 -
【LeetCode】599.Minimum Index Sum of Two Lists(Easy)解题报告
【LeetCode】599.Minimum Index Sum of Two Lists(Easy)解题报告题目地址:https://leetcode.com/problems/minimum-index-sum-of-two-lists/description/ 题目描述: Suppose Andy and Doris want to choose a restaurant for di原创 2017-11-22 10:21:42 · 186 阅读 · 0 评论 -
【LeetCode】100.Same Tree(Easy)解题报告
【LeetCode】100.Same Tree(Easy)解题报告题目地址:https://leetcode.com/problems/same-tree/description/ 题目描述: Given two binary trees, write a function to check if they are the same or not. Two binary...原创 2017-12-10 23:36:29 · 142 阅读 · 0 评论 -
【LeetCode】572.Subtree of Another Tree(Easy)解题报告
【LeetCode】572.Subtree of Another Tree(Easy)解题报告题目地址:https://leetcode.com/problems/subtree-of-another-tree/description/ 题目描述: Given two non-empty binary trees s and t, check whether tree t has exac原创 2017-12-10 23:39:46 · 199 阅读 · 0 评论 -
【LeetCode】726.Number of Atoms(Hard)解题报告
【LeetCode】726.Number of Atoms(Hard)解题报告题目地址:https://leetcode.com/problems/number-of-atoms/description/ 题目描述: Given a chemical formula (given as a string), return the count of each atom. An at原创 2017-11-23 09:03:26 · 871 阅读 · 0 评论