码迷,mamicode.com
首页 >  
搜索关键字:smallest sub-array    ( 590个结果
leetcode 5199. 交换字符串中的元素
地址 https://leetcode-cn.com/contest/weekly-contest-155/problems/smallest-string-with-swaps/ 给你一个字符串 s,以及该字符串中的一些「索引对」数组 pairs,其中 pairs[i] = [a, b] 表示字符 ...
分类:其他好文   时间:2019-09-28 23:30:49    阅读次数:132
HDU 1081 To the Max 最大子矩阵(动态规划求最大连续子序列和)
Description Given a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1*1 or greater locate ...
分类:其他好文   时间:2019-09-25 12:17:22    阅读次数:110
Find K Pairs with Smallest Sums 解答
Question 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 elemen ...
分类:其他好文   时间:2019-09-25 00:57:21    阅读次数:105
leetcode 744.寻找比目标字母大的最小字母(Java 二分查找 easy)
https://leetcode-cn.com/problems/find-smallest-letter-greater-than-target/submissions/ ...
分类:编程语言   时间:2019-09-23 22:12:04    阅读次数:114
908. Smallest Range I - LeetCode
Description: Given an array A of integers, for each integer A[i] we may choose any x with -K <= x <= K, and add x to A[i]. After this process, we have ...
分类:其他好文   时间:2019-09-23 13:39:54    阅读次数:127
LeetCode.1170-比较字符串中最小字符的出现频率(Compare Strings by Frequency of the Smallest Char)
这是小川的第 412 次更新,第 444 篇原创 看题和准备 今天介绍的是 LeetCode 算法题中 Easy 级别的第 263 题(顺位题号是 1170 )。在一个非空字符串s上定义一个函数 ,该函数计算 中最小字符的出现频率。例如,如果 ,则 ,因为最小字符为 ,其频率为2。 现在,给定字符串 ...
分类:其他好文   时间:2019-09-23 09:55:24    阅读次数:91
hdu6602---线段树
"Longest Subarray" 题意:一个数列,每个元素大小都在1到C之间,求一个最长的子串,满足在这个子串中1到C之间的每个数字要么出现0次,要么出现至少K次。 题解:$i$从1到n枚举右端点,维护一个$tree[j]$表示在$i$为右端点时以$j$为左端点可行的个数(这里的可行是指对于1到 ...
分类:其他好文   时间:2019-09-11 00:01:04    阅读次数:105
230. Kth Smallest Element in a BST
Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. Note: You may assume k is always valid, 1 ≤ k ≤ BST's ...
分类:其他好文   时间:2019-09-03 11:32:27    阅读次数:70
【leetcode】1170. Compare Strings by Frequency of the Smallest Character
题目如下: Let's define a function f(s) over a non-empty string s, which calculates the frequency of the smallest character in s. For example, if s = "dcce ...
分类:其他好文   时间:2019-08-31 23:28:00    阅读次数:104
2019/08/25 leetcode
2019/08/25: L230, L226, L18, L234, L23 1. L230 Kth smallest element in BST 借助 Stack 或 LinkedList inorder traveresal, LinkedList会更快 ArrayList, LinkedLi ...
分类:其他好文   时间:2019-08-26 11:33:38    阅读次数:86
590条   上一页 1 ... 4 5 6 7 8 ... 59 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!