上一页 1 2 3 4 5 6 7 8 9 ··· 16 下一页
摘要: Given a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. Th 阅读全文
posted @ 2019-05-09 21:14 小白兔云 阅读(108) 评论(0) 推荐(0)
摘要: Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted i 阅读全文
posted @ 2019-05-08 18:44 小白兔云 阅读(112) 评论(0) 推荐(0)
摘要: Given an array nums of n integers where n > 1, return an array output such that output[i] is equal to the product of all the elements of nums except n 阅读全文
posted @ 2019-05-08 18:26 小白兔云 阅读(102) 评论(0) 推荐(0)
摘要: Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the definition of LCA on Wikipedia: “The lowes 阅读全文
posted @ 2019-05-08 18:03 小白兔云 阅读(102) 评论(0) 推荐(0)
摘要: 1.饿汉式 如果主动使用Singleton类,instance实例将直接完成创建,包括其中的实例变量都会得到初始化,但是instance可能被加载很长一段时间后才被使用,instance实例开辟的堆内存会驻留更久的时间,如果说一个类的成员变量不多,且占用内存资源较少,可以使用饿汉式,总结它可以保证多 阅读全文
posted @ 2019-05-06 19:35 小白兔云 阅读(1464) 评论(0) 推荐(0)
摘要: Java中的Future模式主要是用于等待子线程的返回结果,但是如果一直等待子线程返回值,就会使得主线程阻塞,但其实等待子线程返回值的这段过程中,主线程可以去做其他的事情,不一定要阻塞在原地,Java的Future模式会先返回一个虚拟的结果(假的),主线程可以先去做其他的事情,然后再去获取真实的结果 阅读全文
posted @ 2019-05-06 16:10 小白兔云 阅读(235) 评论(0) 推荐(0)
摘要: Given a sorted integer array without duplicates, return the summary of its ranges. Example 1: Input: [0,1,2,4,5,7] Output: ["0->2","4->5","7"] Explana 阅读全文
posted @ 2019-05-06 10:38 小白兔云 阅读(118) 评论(0) 推荐(0)
摘要: Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. Note: You may assume k is always valid, 1 ≤ k ≤ BST's 阅读全文
posted @ 2019-05-06 10:35 小白兔云 阅读(157) 评论(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) spac 阅读全文
posted @ 2019-05-06 10:31 小白兔云 阅读(168) 评论(0) 推荐(0)
摘要: Find the total area covered by two rectilinear rectangles in a 2D plane. Each rectangle is defined by its bottom left corner and top right corner as s 阅读全文
posted @ 2019-05-05 15:23 小白兔云 阅读(211) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 ··· 16 下一页