随笔分类 -  Heap

摘要:Starting with an undirected graph (the "original graph") with nodes from 0 to N-1, subdivisions are made to some of the edges. The graph is given as f 阅读全文 »
posted @ 2018-12-30 22:21 Veritas_des_Liberty 阅读(329) 评论(0) 推荐(0) 编辑
摘要:A car travels from a starting position to a destination which is target miles east of the starting position. Along the way, there are gas stations. Ea 阅读全文 »
posted @ 2018-12-30 21:13 Veritas_des_Liberty 阅读(338) 评论(0) 推荐(0) 编辑
摘要:There are N workers. The i-th worker has a quality[i] and a minimum wage expectation wage[i]. Now we want to hire exactly K workers to form a paid gro 阅读全文 »
posted @ 2018-12-24 22:26 Veritas_des_Liberty 阅读(299) 评论(0) 推荐(0) 编辑
摘要:There are N network nodes, labelled 1 to N. Given times, a list of travel times as directed edges times[i] = (u, v, w), where u is the source node, v  阅读全文 »
posted @ 2018-12-22 12:10 Veritas_des_Liberty 阅读(310) 评论(0) 推荐(0) 编辑
摘要:Given a non-empty list of words, return the k most frequent elements. Your answer should be sorted by frequency from highest to lowest. If two words h 阅读全文 »
posted @ 2018-12-21 18:37 Veritas_des_Liberty 阅读(325) 评论(0) 推荐(0) 编辑
摘要:Suppose LeetCode will start its IPO soon. In order to sell a good price of its shares to Venture Capital, LeetCode would like to work on some projects 阅读全文 »
posted @ 2018-12-20 22:06 Veritas_des_Liberty 阅读(361) 评论(0) 推荐(0) 编辑
摘要:Given an m x n matrix of positive integers representing the height of each unit cell in a 2D elevation map, compute the volume of water it is able to 阅读全文 »
posted @ 2018-12-20 18:20 Veritas_des_Liberty 阅读(225) 评论(0) 推荐(0) 编辑
摘要:You are given two integer arrays nums1 and nums2 sorted in ascending order and an integer k. Define a pair (u,v) which consists of one element from th 阅读全文 »
posted @ 2018-12-19 20:42 Veritas_des_Liberty 阅读(241) 评论(0) 推荐(0) 编辑
摘要:Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element. Example 阅读全文 »
posted @ 2018-12-19 17:25 Veritas_des_Liberty 阅读(202) 评论(0) 推荐(0) 编辑
摘要:A city's skyline is the outer contour of the silhouette formed by all the buildings in that city when viewed from a distance. Now suppose you are give 阅读全文 »
posted @ 2018-12-18 22:30 Veritas_des_Liberty 阅读(213) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示