上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 30 下一页

2018年1月23日

Insert Interval

摘要: Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary). You may assume that the intervals were initia 阅读全文

posted @ 2018-01-23 13:00 夜的第八章 阅读(132) 评论(2) 推荐(0) 编辑

candy(贪心)

摘要: 【题目】 There are N children standing in a line. Each child is assigned a rating value. You are giving candies to these children subjected to the followi 阅读全文

posted @ 2018-01-23 10:50 夜的第八章 阅读(239) 评论(0) 推荐(0) 编辑

2018年1月22日

Best Time to Buy and Sell Stock

摘要: Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction 阅读全文

posted @ 2018-01-22 18:21 夜的第八章 阅读(134) 评论(0) 推荐(0) 编辑

Best Time to Buy and Sell Stock III

摘要: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may comple 阅读全文

posted @ 2018-01-22 18:15 夜的第八章 阅读(136) 评论(0) 推荐(0) 编辑

distinct subsequences

摘要: Given a string S and a string T, count the number of distinct subsequences of S which equals T. A subsequence of a string is a new string which is for 阅读全文

posted @ 2018-01-22 15:53 夜的第八章 阅读(110) 评论(0) 推荐(0) 编辑

2018年1月21日

edit distance(编辑距离,两个字符串之间相似性的问题)

摘要: Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.) You have 阅读全文

posted @ 2018-01-21 16:04 夜的第八章 阅读(158) 评论(0) 推荐(0) 编辑

trapping rain water

摘要: Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining. 阅读全文

posted @ 2018-01-21 11:45 夜的第八章 阅读(134) 评论(0) 推荐(0) 编辑

2018年1月20日

word break II(单词切分)

摘要: Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, add spaces in s to construct a sentence where each word is 阅读全文

posted @ 2018-01-20 16:54 夜的第八章 阅读(166) 评论(0) 推荐(0) 编辑

sudoku solver(数独)

摘要: Write a program to solve a Sudoku puzzle by filling the empty cells. Empty cells are indicated by the character '.'. You may assume that there will be 阅读全文

posted @ 2018-01-20 11:28 夜的第八章 阅读(182) 评论(0) 推荐(0) 编辑

2018年1月19日

N-Queens(N皇后问题)

摘要: 题目: The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other. Given an integer n, return 阅读全文

posted @ 2018-01-19 21:17 夜的第八章 阅读(186) 评论(0) 推荐(0) 编辑

上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 30 下一页

导航