码迷,mamicode.com
首页 >  
搜索关键字:sorted    ( 5925个结果
82.Remove Duplicates from Sorted List II
``` class Solution { public: ListNode *deleteDuplicates(ListNode *head) { if (!head || !head->next) return head; ListNode *dummy = new ListNode(-1), *... ...
分类:其他好文   时间:2019-04-09 12:25:36    阅读次数:95
刷题之路第四题--取两个顺序数组的数值的中位数
Median of Two Sorted Arrays 简介:取两个顺序数组的数值的中位数 问题详解: 给定两个排序的数组nums1和nums2分别为m和n,我们需要的是两个数组中所组成一个数列的中位数. 注意: 1.需要判断数组NPE 2.结果不是int 举例 1: nums1 = [1, 3] ...
分类:编程语言   时间:2019-04-09 10:55:00    阅读次数:152
33.Search in Rotated Sorted Array
``` class Solution { public: int search(vector& nums, int target) { int left = 0, right = nums.size() - 1; while (left = target) left = mid + 1; else ... ...
分类:其他好文   时间:2019-04-08 21:48:18    阅读次数:174
23.Merge k Sorted Lists
``` class Solution { public: ListNode* mergeKLists(vector& lists) { if (lists.empty()) return NULL; int n = lists.size(); while (n > 1) { int k = (n +... ...
分类:其他好文   时间:2019-04-08 19:55:45    阅读次数:173
leetcode 944. 删列造序(Delete Columns to Make Sorted)
[TOC] 题目描述: 给定由 个小写字母字符串组成的数组 ,其中每个字符串长度相等。 选取一个删除索引序列,对于 中的每个字符串,删除对应每个索引处的字符。 所余下的字符串行从上往下读形成列。 比如,有 ,删除索引序列 ,删除后 为 , A 的列分别为 。(形式上,第 n 列为 )。 假设,我们选 ...
分类:其他好文   时间:2019-04-08 15:58:03    阅读次数:116
88. Merge Sorted Array(js)
88. Merge Sorted Array Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1as one sorted array. Note: The number of elements initia ...
分类:Web程序   时间:2019-04-07 22:17:44    阅读次数:180
Redis学习--Redis数据类型
Redis的5种基本类型 1.String 2.Hash 3.List 4.Set 5.Sorted Set String常见用法 1.get key 返回value 2.set key value 设置键值对 3.getset key value 返回value并且设置键值对 4.del key ...
分类:其他好文   时间:2019-04-06 16:54:11    阅读次数:104
768. Max Chunks To Make Sorted II
This question is the same as "Max Chunks to Make Sorted" except the integers of the given array are not necessarily distinct, the input array could be ...
分类:其他好文   时间:2019-04-06 13:56:24    阅读次数:125
769. Max Chunks To Make Sorted
Given an array arr that is a permutation of [0, 1, ..., arr.length - 1], we split the array into some number of "chunks" (partitions), and individuall ...
分类:其他好文   时间:2019-04-06 12:32:04    阅读次数:118
列表逆向排列的几种实现形式
这里的最后一种方法sorted实际上不算逆向排列了,属于排序,容易混淆,所以给出。 ...
分类:其他好文   时间:2019-04-05 12:27:30    阅读次数:127
5925条   上一页 1 ... 72 73 74 75 76 ... 593 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!