摘要: 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-07-05 04:08 回到明天 阅读(92) 评论(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-07-03 12:15 回到明天 阅读(101) 评论(0) 推荐(0)
摘要: There are n cities connected by m flights. Each fight starts from city u and arrives at v with a price w. Now given all the cities and fights, togethe 阅读全文
posted @ 2018-06-25 04:26 回到明天 阅读(87) 评论(0) 推荐(0)
摘要: You have a lock in front of you with 4 circular wheels. Each wheel has 10 slots: '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'. The wheels can rota 阅读全文
posted @ 2018-06-25 03:15 回到明天 阅读(110) 评论(0) 推荐(0)
摘要: Equations are given in the format A / B = k, where A and B are variables represented as strings, and k is a real number (floating point number). Given 阅读全文
posted @ 2018-06-25 02:25 回到明天 阅读(104) 评论(0) 推荐(0)
摘要: Given a directed, acyclic graph of N nodes. Find all possible paths from node 0 to node N-1, and return them in any order. The graph is given as follo 阅读全文
posted @ 2018-06-24 23:28 回到明天 阅读(120) 评论(0) 推荐(0)
摘要: Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacen 阅读全文
posted @ 2018-06-24 03:34 回到明天 阅读(126) 评论(0) 推荐(0)
摘要: Given two words (beginWord and endWord), and a dictionary's word list, find the length of shortest transformation sequence from beginWord to endWord, 阅读全文
posted @ 2018-06-23 21:57 回到明天 阅读(100) 评论(0) 推荐(0)
摘要: Given a matrix consists of 0 and 1, find the distance of the nearest 0 for each cell. The distance between two adjacent cells is 1. Example 1: Input: 阅读全文
posted @ 2018-06-23 12:50 回到明天 阅读(101) 评论(0) 推荐(0)
摘要: Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors. OJ's undirected graph serialization: Nodes are labeled 阅读全文
posted @ 2018-06-23 08:34 回到明天 阅读(109) 评论(0) 推荐(0)