![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
bald
在读研究生,只是做一些微小的记录。
展开
-
leetcode problem 70. Climbing Stairs
DescriptionYou are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?Note: Given n will be ...原创 2019-04-10 12:16:30 · 109 阅读 · 0 评论 -
leetcode problem 399. Evaluate Division
20190719DescriptionEquations are given in the format A / B = k, where A and B are variables represented as strings, and k is a real number (floating point number). Given some queries, return the a...原创 2019-07-19 22:02:41 · 152 阅读 · 0 评论 -
leetcode problem 312. Burst Balloons 20190718
DescriptionGiven n balloons, indexed from 0 to n-1. Each balloon is painted with a number on it represented by array nums. You are asked to burst all the balloons. If the you burst balloon i you will...原创 2019-07-19 14:30:58 · 144 阅读 · 0 评论 -
leetcode problem 62. Unique Paths [20190417]
DescriptionA 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 r...原创 2019-04-15 14:11:40 · 125 阅读 · 0 评论 -
leetcode problem 287. Find the Duplicate Number 20190416
DescriptionGiven an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. Assume that there is only one duplicat...原创 2019-04-15 14:00:21 · 118 阅读 · 0 评论 -
leetcode problem 96. Unique Binary Search Trees
DescriptionGiven n, how many structurally unique BST’s (binary search trees) that store values 1 … n?Example:Input: 3Output: 5Explanation:Given n = 3, there are a total of 5 unique BST's: 1 ...原创 2019-04-14 23:17:10 · 97 阅读 · 0 评论 -
leetcode problem 538. Convert BST to Greater Tree
DescriptionGiven a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus sum of all keys greater than the original key in ...原创 2019-04-14 14:20:10 · 126 阅读 · 0 评论 -
leetcode problem 46. Permutations
DescriptionGiven a collection of distinct integers, return all possible permutations.Example:Input: [1,2,3]Output:[ [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], [3,2,1]]Solution递归...原创 2019-04-13 15:57:38 · 124 阅读 · 0 评论 -
leetcode problem 121. Best Time to Buy and Sell Stock
DescriptionSay you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transaction (i.e., buy one and sell one share of ...原创 2019-04-03 16:15:19 · 106 阅读 · 0 评论 -
leetcode problem Path Sum (series)
Path Sum 1Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.Note: A leaf is a node with no children....原创 2019-04-12 14:55:36 · 259 阅读 · 0 评论 -
leetcode problem 169. Majority Element
DescriptionGiven an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that the array is non-empty and the majority e...原创 2019-04-02 16:55:54 · 136 阅读 · 0 评论 -
leetcode problem 22. Generate Parentheses
DescriptionGiven n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set is:[ "((()))", "(()())", "(())()", ...原创 2019-04-02 14:40:23 · 146 阅读 · 0 评论 -
leetcode problem 64. Minimum Path Sum
DescriptionGiven 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...原创 2019-04-11 11:11:29 · 159 阅读 · 0 评论 -
leetcode problem 21. Merge Two Sorted Lists
DescriptionMerge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.Example:Input: 1->2->4, 1->3->4O...原创 2019-04-10 16:19:02 · 151 阅读 · 0 评论 -
leetcode problem 394. Decode String
DescriptionGiven an encoded string, return it’s decoded string.The encoding rule is: k[encoded_string], where the encoded_string inside the square brackets is being repeated exactly k times. Note th...原创 2019-04-10 15:48:12 · 123 阅读 · 0 评论 -
leetcode problem 84. Largest Rectangle in Histogram
DescriptionGiven n non-negative integers representing the histogram’s bar height where the width of each bar is 1, find the area of largest rectangle in the histogram.Above is a histogram where widt...原创 2019-08-01 11:03:09 · 128 阅读 · 0 评论