上一页 1 ··· 37 38 39 40 41 42 43 44 45 ··· 50 下一页
摘要: 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-03-09 08:38 轻风舞动 阅读(1229) 评论(0) 推荐(0) 编辑
摘要: 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-03-09 08:21 轻风舞动 阅读(555) 评论(0) 推荐(0) 编辑
摘要: 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-03-09 07:57 轻风舞动 阅读(461) 评论(0) 推荐(0) 编辑
摘要: There is a new alien language which uses the latin alphabet. However, the order among letters are unknown to you. You receive a list of words from the 阅读全文
posted @ 2018-03-09 06:13 轻风舞动 阅读(2467) 评论(3) 推荐(0) 编辑
摘要: There are a total of n courses you have to take, labeled from 0 to n - 1. Some courses may have prerequisites, for example to take course 0 you have t 阅读全文
posted @ 2018-03-09 06:12 轻风舞动 阅读(446) 评论(0) 推荐(0) 编辑
摘要: There are a total of n courses you have to take, labeled from 0 to n - 1. Some courses may have prerequisites, for example to take course 0 you have t 阅读全文
posted @ 2018-03-09 06:10 轻风舞动 阅读(782) 评论(0) 推荐(0) 编辑
摘要: Implement the following operations of a queue using stacks. push(x) -- Push element x to the back of queue. pop() -- Removes the element from in front 阅读全文
posted @ 2018-03-09 03:40 轻风舞动 阅读(348) 评论(0) 推荐(0) 编辑
摘要: Implement the following operations of a stack using queues. push(x) -- Push element x onto stack. pop() -- Removes the element on top of the stack. to 阅读全文
posted @ 2018-03-09 03:36 轻风舞动 阅读(485) 评论(0) 推荐(0) 编辑
摘要: Given a string S, find the length of the longest substring T that contains at most two distinct characters.For example,Given S = "eceba",T is "ece" wh 阅读全文
posted @ 2018-03-08 07:41 轻风舞动 阅读(1872) 评论(0) 推荐(0) 编辑
摘要: 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). For example,S = "ADOBECOD 阅读全文
posted @ 2018-03-07 16:12 轻风舞动 阅读(533) 评论(0) 推荐(0) 编辑
上一页 1 ··· 37 38 39 40 41 42 43 44 45 ··· 50 下一页