上一页 1 2 3 4 5 6 7 8 9 ··· 14 下一页
摘要: You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you nee 阅读全文
posted @ 2020-03-21 21:07 米开朗菠萝 阅读(153) 评论(0) 推荐(0)
摘要: Write a program to find the n-th ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. Example: Input: n = 10 Outpu 阅读全文
posted @ 2020-03-21 19:35 米开朗菠萝 阅读(114) 评论(0) 推荐(0)
摘要: Given a 2D binary matrix filled with 0's and 1's, find the largest square containing only 1's and return its area. Example: Input: 1 0 1 0 0 1 0 1 1 1 阅读全文
posted @ 2020-03-21 18:46 米开朗菠萝 阅读(128) 评论(0) 推荐(0)
摘要: Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. Example 1: Input: 阅读全文
posted @ 2020-03-19 21:36 米开朗菠萝 阅读(100) 评论(0) 推荐(0)
摘要: On a staircase, the i-th step has some non-negative cost cost[i] assigned (0 indexed). Once you pay the cost, you can either climb one or two steps. Y 阅读全文
posted @ 2020-03-18 11:53 米开朗菠萝 阅读(121) 评论(0) 推荐(0)
摘要: Given a string s and a string t, check if s is subsequence of t. You may assume that there is only lower case English letters in both s and t. t is po 阅读全文
posted @ 2020-03-18 10:41 米开朗菠萝 阅读(136) 评论(0) 推荐(0)
摘要: Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. Example: Given nums = [-2, 0, 3, -5, 2, -1] sumR 阅读全文
posted @ 2020-03-17 15:37 米开朗菠萝 阅读(83) 评论(0) 推荐(0)
摘要: You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping yo 阅读全文
posted @ 2020-03-16 22:36 米开朗菠萝 阅读(118) 评论(0) 推荐(0)
摘要: Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can be segmented into a space-separated sequ 阅读全文
posted @ 2020-03-16 20:47 米开朗菠萝 阅读(157) 评论(0) 推荐(0)
摘要: Given a binary tree, return all root-to-leaf paths. Note: A leaf is a node with no children. Example: Input: 1 / \ 2 3 \ 5 Output: ["1->2->5", "1->3"] 阅读全文
posted @ 2020-03-12 05:11 米开朗菠萝 阅读(95) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 ··· 14 下一页