heap
Opium_Z
这个作者很懒,什么都没留下…
展开
-
Find the k nearest point from the origin
Find the k nearest point from the origin---FaceBook 一轮电面 There are some locations, find the K nearest oneJava There are some locations, find the K nearest one input: [1,1],[2,3],[-1,-1], k=2 output:[1...原创 2019-03-10 03:10:59 · 158 阅读 · 0 评论 -
Leetcode 253: meeting room
Arrang classes, you’re gonna figure out the min classroom required. input: [0, 30],[5, 10],[15, 20] output: 2 Java: /* * public class Interval { int start; int end; public Interval() { this....原创 2019-03-10 03:39:18 · 394 阅读 · 0 评论 -
LeetCode 23 Merge k Sorted Lists
Problem: Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Example: Input: [ 1->4->5, 1->3->4, 2->6 ] Output: 1->1->2->3->4-...原创 2019-04-01 12:07:48 · 140 阅读 · 0 评论