上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 33 下一页
摘要: Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the root-to-leaf path 1->2->3 whic 阅读全文
posted @ 2019-12-12 11:59 xuan_abc 阅读(121) 评论(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-12-11 12:05 xuan_abc 阅读(148) 评论(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 f 阅读全文
posted @ 2019-12-11 11:33 xuan_abc 阅读(154) 评论(0) 推荐(0)
摘要: Given a sorted array nums, remove the duplicates in-place such that duplicates appeared at most twice and return the new length. Do not allocate extra 阅读全文
posted @ 2019-12-11 10:46 xuan_abc 阅读(120) 评论(0) 推荐(0)
摘要: Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,0,1,2,2,5,6] might become [2,5,6,0,0,1,2]). Y 阅读全文
posted @ 2019-12-11 10:26 xuan_abc 阅读(124) 评论(0) 推荐(0)
摘要: Design a Phone Directory which supports the following operations: get: Provide a number which is not assigned to anyone. check: Check if a number is a 阅读全文
posted @ 2019-12-11 09:54 xuan_abc 阅读(177) 评论(0) 推荐(0)
摘要: Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]). Y 阅读全文
posted @ 2019-12-10 11:22 xuan_abc 阅读(122) 评论(0) 推荐(0)
摘要: Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two 阅读全文
posted @ 2019-12-10 11:03 xuan_abc 阅读(176) 评论(0) 推荐(0)
摘要: Design a hit counter which counts the number of hits received in the past 5 minutes. Each function accepts a timestamp parameter (in seconds granulari 阅读全文
posted @ 2019-12-09 11:50 xuan_abc 阅读(161) 评论(0) 推荐(0)
摘要: Design a data structure that supports all following operations in average O(1) time. insert(val): Inserts an item val to the set if not already presen 阅读全文
posted @ 2019-12-09 09:37 xuan_abc 阅读(206) 评论(0) 推荐(0)
上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 33 下一页