摘要:
题目: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 pa... 阅读全文
摘要:
题目:Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate each next po... 阅读全文
摘要:
题目:Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty spa... 阅读全文
摘要:
题目: 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 a... 阅读全文
摘要:
题目:You 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... 阅读全文
摘要:
题目:Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set is... 阅读全文
摘要:
题目:You are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?题解:这道题就是考察很... 阅读全文
摘要:
题目:Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999. 题解:这道题跟interger to roman一样都得先熟悉罗马数字的规则。罗... 阅读全文
摘要:
题目:Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.题解:这道题。。还有哪个roman to integer。。第一件事 就是先把r... 阅读全文
摘要:
题目:Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321click to show spoilers.Have you thought about this?Here... 阅读全文
摘要:
题目:Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1... 阅读全文
摘要:
题目:Given a string containing only digits, restore it by returning all possible valid IP address combinations.For example:Given "25525511135",return [... 阅读全文
摘要:
题目:Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.Each ... 阅读全文