摘要: 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 阅读(149) 评论(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 阅读(178) 评论(0) 推荐(0)