码迷,mamicode.com
首页 >  
搜索关键字:median of two sor    ( 12209个结果
667. Beautiful Arrangement II
1. Question: 667. Beautiful Arrangement II https://leetcode.com/problems/beautiful-arrangement-ii/ Given two integers n and k, you need to construct a ...
分类:其他好文   时间:2018-11-22 02:45:58    阅读次数:331
Leetcode11 Container With Most Water
首先想到的肯定是暴力解法,O(n^2)。 421ms,8.51%,肯定不行,思考更优解法。 自己想到了two pointer,但是没有彻底想明白,看了solution后明白了。 6ms,66.7%,O(n)。和3ms答案基本一个思路了,可以了。 ...
分类:其他好文   时间:2018-11-21 22:15:08    阅读次数:177
#Leetcode# 4. Median of Two Sorted Arrays
https://leetcode.com/problems/median-of-two-sorted-arrays/ There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median o ...
分类:其他好文   时间:2018-11-21 16:19:30    阅读次数:130
两个数组的交集
Given two arrays, write a function to compute their intersection. Example 1: Input: nums1 = [1,2,2,1], nums2 = [2,2] Output: [2] Example 2: Input: num ...
分类:编程语言   时间:2018-11-21 16:12:27    阅读次数:149
hdu2021
#include int main() { int n; int i; int mny[200]; int hund,fifty,ten,five,two,one; int total; while(~scanf("%d",&n)) { total =0; if(n==0) break... ...
分类:其他好文   时间:2018-11-20 23:10:06    阅读次数:152
莫队详解
莫队实际很简(du)单(liu) 依照某位dalao的说法,就是两只小手(two pointers)瞎跳 莫队 我们以 "Luogu P3901 数列找不同" 为例讲一下静态莫队 这道题是个绿题,因为数据比较弱,但真是一道良心的莫队练手题 莫队是由前国家队队长莫涛发明的 莫队算法的精髓就是通过合理地 ...
分类:其他好文   时间:2018-11-20 21:45:54    阅读次数:231
#Leetcode# 29. Divide Two Integers
https://leetcode.com/problems/divide-two-integers/ Given two integers dividend and divisor, divide two integers without using multiplication, division ...
分类:其他好文   时间:2018-11-20 00:08:49    阅读次数:140
pcl之basic usage
pcl之basic usage + width (int) two meanings: 1. it can specify the total number of points in the cloud for unorganized point cloud datasets; 2. it can ...
分类:其他好文   时间:2018-11-20 00:07:54    阅读次数:190
167. Two Sum II - Input array is sorted
1. Question: 167. Two Sum II - Input array is sorted url : https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/ Given an array of integers ...
分类:其他好文   时间:2018-11-20 00:02:17    阅读次数:189
1. Two Sum
https://leetcode.com/problems/two-sum/description/ ...
分类:其他好文   时间:2018-11-19 14:09:19    阅读次数:152
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!