2016年9月11日

119. Pascal's Triangle II

摘要: Given an index k, return the kth row of the Pascal's triangle. For example, given k = 3,Return [1,3,3,1]. 分析 二项式展开式的系数 不加(long long)提交会出错。 阅读全文

posted @ 2016-09-11 22:47 三颗心 阅读(144) 评论(0) 推荐(0)

118. Pascal's Triangle

摘要: Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5,Return 阅读全文

posted @ 2016-09-11 22:41 三颗心 阅读(462) 评论(0) 推荐(0)

66. Plus One

摘要: Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most significant digit is a 阅读全文

posted @ 2016-09-11 22:18 三颗心 阅读(264) 评论(0) 推荐(0)

80. Remove Duplicates from Sorted Array II

摘要: Follow up for "Remove Duplicates":What if duplicates are allowed at most twice? For example,Given sorted array nums = [1,1,1,2,2,3], Your function sho 阅读全文

posted @ 2016-09-11 16:10 三颗心 阅读(295) 评论(0) 推荐(0)

26. Remove Duplicates from Sorted Array

摘要: Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra space fo 阅读全文

posted @ 2016-09-11 13:05 三颗心 阅读(267) 评论(0) 推荐(0)

导航