摘要:
Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array [2,3,-2,4], t... 阅读全文
摘要:
Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.For exam... 阅读全文
摘要:
You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the quality c... 阅读全文
摘要:
Related to question Excel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its corresponding column number.For example: A... 阅读全文
摘要:
对于Vector的用法,实在是知道的太少,算法思想比较简单,核心也就一行代码,但是实现错误就显示平时代码的不熟悉。Given numRows, generate the first numRows of Pascal's triangle.For example, given numRows = 5... 阅读全文
摘要:
这应该是我自己做出来的第一道题,所以刚开始的时候把我激动坏了。Write a program to check whether a given number is an ugly number.Ugly numbers are positive numbers whose prime factors... 阅读全文
摘要:
刚注册了leetcode,推荐的第一题就是Nim Game。You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you ta... 阅读全文