码迷,mamicode.com
首页 >  
搜索关键字:median of two sorted    ( 17004个结果
21. Merge Two Sorted Lists
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. Example: ...
分类:其他好文   时间:2020-02-13 20:46:21    阅读次数:72
[LC] 373. Find K Pairs with Smallest Sums
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 ...
分类:其他好文   时间:2020-02-13 13:22:48    阅读次数:67
LeetCode 1117. Building H2O
原题链接在这里:https://leetcode.com/problems/building-h2o/ 题目: There are two kinds of threads, oxygen and hydrogen. Your goal is to group these threads to fo ...
分类:其他好文   时间:2020-02-13 10:02:55    阅读次数:76
[LeetCode] 70. Climbing Stairs
爬楼梯。题意是给一个数字n代表楼梯的高度,你可以每次爬一步或者两步,求有多少种不同的爬法。例子, Example 1: Input: 2 Output: 2 Explanation: There are two ways to climb to the top. 1. 1 step + 1 step ...
分类:其他好文   时间:2020-02-13 09:56:32    阅读次数:70
1343. Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold
Given an array of integers arr and two integers k and threshold. Return the number of sub-arrays of size k and average greater than or equal to thresh ...
分类:其他好文   时间:2020-02-13 09:42:29    阅读次数:54
1344. Angle Between Hands of a Clock
Given two numbers, hour and minutes. Return the smaller angle (in sexagesimal units) formed between the hour and the minute hand. Example 1: Input: ho ...
分类:其他好文   时间:2020-02-13 09:30:42    阅读次数:57
LeetCode | 0088. Merge Sorted Array合并两个有序数组【Python】
LeetCode 0088. Merge Sorted Array合并两个有序数组【Easy】【Python】【双指针】 题目 "英文题目链接" Given two sorted integer arrays nums1 and nums2 , merge nums2 into nums1 as o ...
分类:编程语言   时间:2020-02-12 23:50:19    阅读次数:89
# codeforces 1272 F. Two Bracket Sequences(三维dp + bfs)
codeforces 1272 F. Two Bracket Sequences(三维dp + bfs) 题目大意 输入两个括号序列 s,t(不一定合法),你需要构造一个尽可能短的合法括号序列使得s,t 都是这个序列的子序列(子序列意味着不用连续) 解题思路 表示匹配到 的第 个字符,匹配到 的第 ...
分类:其他好文   时间:2020-02-12 21:57:14    阅读次数:63
POJ1094 Sorting It All Out
An ascending sorted sequence of distinct values is one in which some form of a less-than operator is used to order the elements from smallest to large ...
分类:其他好文   时间:2020-02-12 18:29:23    阅读次数:62
1044 Shopping in Mars
大致题意就是给定N个数,找出满足第i个数到第j个数的和SUM等于M(如果找不到,也可以找SUM-M>0差值最小)的i和j,并输出i-j。 思路:这题可以用二分法做,但是二分法边界值条件太多,容易出错,推荐使用two pointers。这题用的是two pointers同向扫描法,固定左边界,移动右边 ...
分类:其他好文   时间:2020-02-12 13:06:56    阅读次数:61
17004条   上一页 1 ... 75 76 77 78 79 ... 1701 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!