摘要: Let's say we are going to find out number of occurrences of a number in a sorted array using binary search in O(log n) time. For example the given arr 阅读全文
posted @ 2019-03-20 20:36 Zhentiw 阅读(181) 评论(0) 推荐(0)
摘要: One approach to building high performance applications with webpack is to take advantage of code-splitting to only load the needed JavaScript on initi 阅读全文
posted @ 2019-03-20 16:20 Zhentiw 阅读(292) 评论(0) 推荐(0)
摘要: Given a stream of elements too large to store in memory, pick a random element from the stream with uniform probability. To solve the problem which n 阅读全文
posted @ 2019-03-20 03:22 Zhentiw 阅读(431) 评论(0) 推荐(0)
摘要: You run an e-commerce website and want to record the last N order ids in a log. Implement a data structure to accomplish this, with the following API: 阅读全文
posted @ 2019-03-20 02:24 Zhentiw 阅读(271) 评论(0) 推荐(0)