2016年3月11日

70. Climbing Stairs

摘要: 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 cl 阅读全文

posted @ 2016-03-11 11:13 olive_lv 阅读(127) 评论(0) 推荐(0)

53. Maximum Subarray

摘要: Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [−2,1,−3,4,−1,2, 阅读全文

posted @ 2016-03-11 11:13 olive_lv 阅读(154) 评论(0) 推荐(0)

263. Ugly Number

摘要: Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For exa 阅读全文

posted @ 2016-03-11 11:12 olive_lv 阅读(112) 评论(0) 推荐(0)

22. Generate Parentheses

摘要: 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: " 阅读全文

posted @ 2016-03-11 11:12 olive_lv 阅读(148) 评论(0) 推荐(0)

导航