学会思考
刻意练习
摘要: /* Two Sum *Description: Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific ta 阅读全文
posted @ 2020-03-06 17:29 Worty 阅读(80) 评论(0) 推荐(0) 编辑
摘要: /* *Best Time to Buy and Sell Stock II Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to 阅读全文
posted @ 2020-03-06 17:05 Worty 阅读(115) 评论(0) 推荐(0) 编辑
摘要: /* * Best Time to Buy and Sell Stock I * Say you have an array for which the ith element is the price of a given stock on day i. * If you were only pe 阅读全文
posted @ 2020-03-06 16:00 Worty 阅读(124) 评论(0) 推荐(0) 编辑
摘要: /* Pascal's Triangle II Description Given a non-negative index k where k ≤ 33, return the kth index row of the Pascal's triangle. Note that the row in 阅读全文
posted @ 2020-03-06 15:16 Worty 阅读(126) 评论(0) 推荐(0) 编辑
摘要: //杨辉三角(数组) /* * @Description: Given a non-negative integer numRows, generate the first numRows of Pascal's triangle. * Input: 5 * Output: * [ * [1], * 阅读全文
posted @ 2020-03-06 14:24 Worty 阅读(245) 评论(0) 推荐(0) 编辑