上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 20 下一页
摘要: 1 """ 2 Given a non-negative integer numRows, generate the first numRows of Pascal's triangle. 3 In Pascal's triangle, each number is the sum of the t 阅读全文
posted @ 2020-02-28 00:42 yawenw 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 1 """ 2 Say you have an array for which the ith element is the price of a given stock on day i. 3 Design an algorithm to find the maximum profit. You 阅读全文
posted @ 2020-02-28 00:41 yawenw 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 1 """ 2 Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value. 3 Your algorithm's r 阅读全文
posted @ 2020-02-27 21:10 yawenw 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 1 """ 2 Given a set of distinct integers, nums, return all possible subsets (the power set). 3 Note: The solution set must not contain duplicate subse 阅读全文
posted @ 2020-02-27 00:08 yawenw 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 1 """ 2 Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n). 3 Example: 4 Inpu 阅读全文
posted @ 2020-02-26 23:33 yawenw 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 1 """ 2 Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in-place. 3 Example 1: 4 Input: 5 [ 6 [1,1,1], 7 [1,0,1], 阅读全文
posted @ 2020-02-26 21:30 yawenw 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 1 """ 2 You are climbing a stair case. It takes n steps to reach to the top. 3 Each time you can either climb 1 or 2 steps. In how many distinct ways 阅读全文
posted @ 2020-02-26 20:40 yawenw 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 1 """ 2 Implement pow(x, n), which calculates x raised to the power n (xn). 3 Example 1: 4 Input: 2.00000, 10 5 Output: 1024.00000 6 Example 2: 7 Inpu 阅读全文
posted @ 2020-02-25 23:35 yawenw 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 1 """ 2 Given an array of strings, group anagrams together. 3 Example: 4 Input: ["eat", "tea", "tan", "ate", "nat", "bat"], 5 Output: 6 [ 7 ["ate","ea 阅读全文
posted @ 2020-02-25 22:26 yawenw 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 1 """ 2 You are given an n x n 2D matrix representing an image. 3 Rotate the image by 90 degrees (clockwise). 4 Note: 5 You have to rotate the image i 阅读全文
posted @ 2020-02-25 21:51 yawenw 阅读(85) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 20 下一页