摘要: Given an array, rotate the array to the right by k steps, where k is non-negative. Example 1: Example 2: Note: Try to come up as many solutions as you 阅读全文
posted @ 2018-03-25 13:42 轻风舞动 阅读(1031) 评论(0) 推荐(0) 编辑
摘要: Compare two version numbers version1 and version1.If version1 > version2 return 1, if version1 < version2 return -1, otherwise return 0. You may assum 阅读全文
posted @ 2018-03-25 12:22 轻风舞动 阅读(401) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2018-03-25 12:21 轻风舞动 阅读(636) 评论(0) 推荐(0) 编辑
摘要: Given an index k, return the kth row of the Pascal's triangle. For example, given k = 3,Return [1,3,3,1]. Note:Could you optimize your algorithm to us 阅读全文
posted @ 2018-03-25 05:20 轻风舞动 阅读(385) 评论(0) 推荐(0) 编辑
摘要: Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5,Return 杨辉三角形,又称贾宪三角形、帕斯卡三角形、海亚姆三角形、巴斯卡三角形,是二项式系数在的一种写法, 阅读全文
posted @ 2018-03-25 05:10 轻风舞动 阅读(2290) 评论(0) 推荐(0) 编辑