上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 29 下一页
摘要: 题目: Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1, col1) and lower right corner ( 阅读全文
posted @ 2020-02-11 23:15 silentteller 阅读(224) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a 2D binary matrix filled with 0's and 1's, find the largest square containing only 1's and return its area. Example: Input: 1 0 1 0 0 1 0 1 阅读全文
posted @ 2020-02-11 21:51 silentteller 阅读(432) 评论(0) 推荐(0) 编辑
摘要: 题目: Implement a MapSum class with insert, and sum methods. For the method insert, you'll be given a pair of (string, integer). The string represents t 阅读全文
posted @ 2020-02-10 23:11 silentteller 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome. Example 1: Input: "aba" Output: True 阅读全文
posted @ 2020-02-10 22:27 silentteller 阅读(280) 评论(0) 推荐(0) 编辑
摘要: 题目: Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, 阅读全文
posted @ 2020-02-10 00:20 silentteller 阅读(258) 评论(0) 推荐(0) 编辑
摘要: 题目: Design a data structure that supports all following operations in averageO(1) time. Note: Duplicate elements are allowed. insert(val): Inserts an 阅读全文
posted @ 2020-02-08 21:56 silentteller 阅读(244) 评论(0) 推荐(0) 编辑
摘要: 题目: Design a data structure that supports all following operations in averageO(1) time. insert(val): Inserts an item val to the set if not already pre 阅读全文
posted @ 2020-01-31 14:33 silentteller 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 题目: Given an unsorted array of integers, find the number of longest increasing subsequence. Example 1: Input: [1,3,5,4,7] Output: 2 Explanation: The t 阅读全文
posted @ 2020-01-17 17:54 silentteller 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 题目: You are asked to cut off trees in a forest for a golf event. The forest is represented as a non-negative 2D map, in this map: 0 represents the obs 阅读全文
posted @ 2020-01-17 15:51 silentteller 阅读(274) 评论(0) 推荐(0) 编辑
摘要: 题目: Design and implement a data structure for Least Frequently Used (LFU)cache. It should support the following operations: get and put. get(key) - Ge 阅读全文
posted @ 2020-01-15 16:02 silentteller 阅读(349) 评论(0) 推荐(0) 编辑
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 29 下一页