IncredibleThings

导航

2018年4月28日 #

Microsoft - Find the K closest points to the origin in a 2D plane

摘要: Find the K closest points to the origin in a 2D plane, given an array containing N points. 用 max heap 做 阅读全文

posted @ 2018-04-28 23:40 IncredibleThings 阅读(153) 评论(0) 推荐(0) 编辑

Microsoft - Get Course Order

摘要: // "static void main" must be defined in a public class. public class Main { public static void main(String[] args) { int[][] info = new int[4][]; info[0] = null; info[... 阅读全文

posted @ 2018-04-28 12:57 IncredibleThings 阅读(159) 评论(0) 推荐(0) 编辑

LeetCode - Sum of Two Integers

摘要: Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -. Example:Given a = 1 and b = 2, return 3. 1、输入 a,b 2、按照 阅读全文

posted @ 2018-04-28 11:09 IncredibleThings 阅读(109) 评论(0) 推荐(0) 编辑

Microsoft - Find Biggest Node

摘要: public Node findBiggest (Node n1, Node n2){ Node c1 = n1; Node c2 = n2; boolean isPositive = false; if(n1.value == '-'){ if(n2.value != '-'){ return n2; ... 阅读全文

posted @ 2018-04-28 10:18 IncredibleThings 阅读(127) 评论(0) 推荐(0) 编辑