摘要: 1 package day20170206; 2 //LeetCode:441. Arranging Coins 3 /* 4 You have a total of n coins that you want to form in a staircase shape, where every k-th row must have exactly k coins. 5 Given n... 阅读全文
posted @ 2017-02-07 10:04 蒲公英的花朵 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 1 package day20170206; 2 //LeetCode:374. Guess Number Higher or Lower 3 /* 4 We are playing the Guess Game. The game is as follows: 5 I pick a number from 1 to n. You have to guess which number... 阅读全文
posted @ 2017-02-07 10:03 蒲公英的花朵 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 1 package day20170206; 2 //LeetCode:53. Maximum Subarray 3 /* 4 Find the contiguous subarray within an array (containing at least one number) which has the largest sum. 5 6 For example, given... 阅读全文
posted @ 2017-02-07 10:02 蒲公英的花朵 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 1 package day20170206; 2 //LeetCode:367. Valid Perfect Square 3 /* 4 Given a positive integer num, write a function which returns True if num is a perfect square else False. 5 6 Note: Do not ... 阅读全文
posted @ 2017-02-07 10:02 蒲公英的花朵 阅读(209) 评论(0) 推荐(0) 编辑