上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 37 下一页
摘要: There are 2N people a company is planning to interview. The cost of flying the i-th person to city A is costs[i][0], and the cost of flying the i-th p 阅读全文
posted @ 2020-06-04 02:24 Review->Improve 阅读(239) 评论(0) 推荐(0) 编辑
摘要: There are a total of n courses you have to take, labeled from 0 to n-1. Some courses may have direct prerequisites, for example, to take course 0 you 阅读全文
posted @ 2020-05-31 10:49 Review->Improve 阅读(772) 评论(0) 推荐(0) 编辑
摘要: Given preorder and inorder traversal of a tree, construct the binary tree. You may assume that duplicates do not exist in the tree. Example Given in-o 阅读全文
posted @ 2020-05-28 02:25 Review->Improve 阅读(380) 评论(0) 推荐(0) 编辑
摘要: Return the lexicographically smallest subsequence of text that contains all the distinct characters of text exactly once. Example 1: Input: "cdadabcc" 阅读全文
posted @ 2020-05-27 12:20 Review->Improve 阅读(279) 评论(0) 推荐(0) 编辑
摘要: Given many words, words[i] has weight i. Design a class WordFilter that supports one function, WordFilter.f(String prefix, String suffix). It will ret 阅读全文
posted @ 2020-05-27 06:54 Review->Improve 阅读(284) 评论(0) 推荐(0) 编辑
摘要: Given a char array representing tasks CPU need to do. It contains capital letters A to Z where different letters represent different tasks. Tasks coul 阅读全文
posted @ 2020-05-27 03:13 Review->Improve 阅读(245) 评论(0) 推荐(0) 编辑
摘要: Given a binary array, find the maximum length of a contiguous subarray with equal number of 0 and 1. Example 1: Input: [0,1] Output: 2 Explanation: [0 阅读全文
posted @ 2020-05-26 22:23 Review->Improve 阅读(261) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers and a number k, the majority number is the number that occurs more than 1/k of the size of the array, find all the majority 阅读全文
posted @ 2020-05-22 06:29 Review->Improve 阅读(175) 评论(0) 推荐(0) 编辑
摘要: Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times. Note: The algorithm should run in linear time and in O(1) spa 阅读全文
posted @ 2020-05-22 06:10 Review->Improve 阅读(158) 评论(0) 推荐(0) 编辑
摘要: Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assume that the 阅读全文
posted @ 2020-05-22 04:53 Review->Improve 阅读(176) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 37 下一页