摘要: Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) -- Push element x onto stack. pop() -- Remov 阅读全文
posted @ 2017-03-04 08:52 CodesKiller 阅读(175) 评论(0) 推荐(0) 编辑
摘要: Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k num 阅读全文
posted @ 2017-03-04 07:59 CodesKiller 阅读(152) 评论(0) 推荐(0) 编辑
摘要: Given a binary array, find the maximum length of a contiguous subarray with equal number of 0 and 1. Example 1: Example 2: Note: The length of the giv 阅读全文
posted @ 2017-03-04 06:50 CodesKiller 阅读(620) 评论(0) 推荐(0) 编辑
摘要: 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 (row2 阅读全文
posted @ 2017-03-04 05:26 CodesKiller 阅读(132) 评论(0) 推荐(0) 编辑