上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 37 下一页
摘要: Problem Link: Multiple of 2019 Key idea: For subarray S[i1, j] and S[i2, j] with i1 < i2, if the V[i1, j] % 2019 is the same with V[i2, k] % 2019, it 阅读全文
posted @ 2020-05-13 05:18 Review->Improve 阅读(199) 评论(0) 推荐(0) 编辑
摘要: Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining. 阅读全文
posted @ 2020-05-08 09:41 Review->Improve 阅读(132) 评论(0) 推荐(0) 编辑
摘要: There are n people and 40 types of hats labeled from 1 to 40. Given a list of list of integers hats, where hats[i] is a list of all hats preferred by 阅读全文
posted @ 2020-05-06 02:25 Review->Improve 阅读(629) 评论(0) 推荐(0) 编辑
摘要: You are given an m * n matrix, mat, and an integer k, which has its rows sorted in non-decreasing order. You are allowed to choose exactly 1 element f 阅读全文
posted @ 2020-05-05 05:32 Review->Improve 阅读(609) 评论(0) 推荐(0) 编辑
摘要: Given an array of n integer with duplicate number, and a moving window(size k), move the window at each iteration from the start of the array, find th 阅读全文
posted @ 2020-05-05 02:47 Review->Improve 阅读(498) 评论(0) 推荐(0) 编辑
摘要: Given three integers n, m and k. Consider the following algorithm to find the maximum element of an array of positive integers: You should build the a 阅读全文
posted @ 2020-04-21 04:47 Review->Improve 阅读(597) 评论(0) 推荐(0) 编辑
摘要: Given a string containing only three types of characters: '(', ')' and '*', write a function to check whether this string is valid. We define the vali 阅读全文
posted @ 2020-04-17 23:53 Review->Improve 阅读(224) 评论(0) 推荐(0) 编辑
摘要: You are given two integer arrays nums1 and nums2 sorted in ascending order and an integer k. Define a pair (u,v) which consists of one element from th 阅读全文
posted @ 2020-04-15 03:00 Review->Improve 阅读(377) 评论(0) 推荐(0) 编辑
摘要: Given a n x n matrix where each of the rows and columns are sorted in ascending order, find the kth smallest element in the matrix. Note that it is th 阅读全文
posted @ 2020-04-15 01:57 Review->Improve 阅读(283) 评论(0) 推荐(0) 编辑
摘要: Given the array queries of positive integers between 1 and m, you have to process all queries[i] (from i=0 to i=queries.length-1) according to the fol 阅读全文
posted @ 2020-04-14 08:04 Review->Improve 阅读(690) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 37 下一页