码迷,mamicode.com
首页 >  
搜索关键字:smallest    ( 560个结果
小学奥数题——A Simple Problem
看一下题目大意: For a given positive integer n, please find the smallest positive integer x that we can find an integer y such that y^2 = n +x^2.。 自己翻译一下,不难 ...
分类:其他好文   时间:2020-05-25 12:06:37    阅读次数:75
PAT.Recover the smallest number(字符串排序,注意输出)
1038 Recover the Smallest Number (30分) Given a collection of number segments, you are supposed to recover the smallest number from them. For example, ...
分类:编程语言   时间:2020-05-25 00:13:01    阅读次数:66
【每日一题】- Leetcode 402. Remove K Digits
Description: Given a non-negative integer num represented as a string, remove k digits from the number so that the new number is the smallest possible ...
分类:其他好文   时间:2020-05-15 00:34:42    阅读次数:86
【LeetCode-树】二叉搜索树中第K小的元素
题目描述 给定一个二叉搜索树,编写一个函数?kthSmallest?来查找其中第?k?个最小的元素。 说明: 你可以假设 k 总是有效的,1 ≤ k ≤ 二叉搜索树元素个数。 示例: 题目链接: https://leetcode cn.com/problems/kth smallest elemen ...
分类:其他好文   时间:2020-05-06 12:02:09    阅读次数:46
719. Find K-th Smallest Pair Distance
问题: 求给定数组中两两元素之差,从小到大第k个差是多少 Example 1: Input: nums = [1,3,1] k = 1 Output: 0 Explanation: Here are all the pairs: (1,3) -> 2 (1,1) -> 0 (3,1) -> 2 Th ...
分类:其他好文   时间:2020-05-04 15:42:43    阅读次数:48
[LeetCode in Python] 5403 (H) find the kth smallest sum of a matrix with sorted rows 有序矩阵中的第 k 个最小数组和
题目 https://leetcode cn.com/problems/find the kth smallest sum of a matrix with sorted rows/ 给你一个 m n 的矩阵 mat,以及一个整数 k ,矩阵中的每一行都以非递减的顺序排列。 你可以从每一行中选出 1 ...
分类:编程语言   时间:2020-05-03 20:16:18    阅读次数:80
LC 1439. Find the Kth Smallest Sum of a Matrix With Sorted Rows
link class Solution { public: struct Comp{ bool operator()(vector<int>& v1, vector<int>& v2){ return v1[0]+v1[1]>v2[0]+v2[1]; } }; int kthSmallest(vec ...
分类:其他好文   时间:2020-05-03 20:13:29    阅读次数:92
5403. Find the Kth Smallest Sum of a Matrix With Sorted Rows
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 ...
分类:其他好文   时间:2020-05-03 18:14:33    阅读次数:59
1144 The Missing Number (20分)
Given N integers, you are supposed to find the smallest positive integer that is NOT in the given list. Input Specification: Each input file contains ...
分类:其他好文   时间:2020-05-02 14:56:53    阅读次数:58
402. Remove K Digits
Given a non-negative integer num represented as a string, remove k digits from the number so that the new number is the smallest possible. Note: The l ...
分类:其他好文   时间:2020-03-29 11:03:55    阅读次数:74
560条   上一页 1 2 3 4 5 ... 56 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!