码迷,mamicode.com
首页 >  
搜索关键字:palindrome numbers    ( 9163个结果
剑指offer:最小的K个数
题意描述 输入n个整数,找出其中最小的K个数。例如输入4,5,1,6,2,7,3,8这8个数字,则最小的4个数字是1,2,3,4,。 解题思路 一、冒泡排序/选择排序 对数组进行排序,从数组中取出最小的k个数。不需要对数组全部排序,只需要找出前k个数即可。 二、快速排序 利用快速排序 划分 的思想, ...
分类:其他好文   时间:2020-04-18 22:49:10    阅读次数:54
Python使用openpyxl读写excel文件
这是一个第三方库,可以处理xlsx格式的Excel文件。pip install openpyxl安装。如果使用Aanconda,应该自带了。 读取Excel文件 需要导入相关函数。 1 from openpyxl import load_workbook 2 3 # 默认可读写,若有需要可以指定wr ...
分类:编程语言   时间:2020-04-18 18:34:24    阅读次数:58
Codeforces Global Round 7 D2. Prefix-Suffix Palindrome (Hard version)(Manacher算法+输出回文字符串)
This is the hard version of the problem. The difference is the constraint on the sum of lengths of strings and the number of test cases. You can make ...
分类:编程语言   时间:2020-04-18 14:10:40    阅读次数:87
646. Maximum Length of Pair Chain
Problem : You are given n pairs of numbers. In every pair, the first number is always smaller than the second number. Now, we define a pair (c, d) can ...
分类:其他好文   时间:2020-04-18 10:09:19    阅读次数:67
scala - 基础:Scala fold, foldLeft, foldRight
说明 从本质上来讲,fold方法读取一种数据,然后返回给你另外一种。 fold和foldLeft和foldRight做的事同样的事情,仅有一点点不同。 fold val numbers = List(1, 2, 3, 4, 5) val res = numbers.fold(10) { (z, i)... ...
分类:其他好文   时间:2020-04-18 09:32:45    阅读次数:47
leetcode刷题2-两数之和
给出两个 非空 的链表用来表示两个非负的整数。其中,它们各自的位数是按照 逆序 的方式存储的,并且它们的每个节点只能存储 一位 数字。 如果,我们将这两个数相加起来,则会返回一个新的链表来表示它们的和。 您可以假设除了数字 0 之外,这两个数都不会以 0 开头。 来源:力扣(LeetCode)链接: ...
分类:其他好文   时间:2020-04-18 09:27:22    阅读次数:62
CodeForces 55D Beautiful numbers
"CodeForces 55D Beautiful numbers" 一句话题意:有T组询问,每次询问区间[l, r]中的beautiful number有多少。beautiful number是指这个数可以被组成它的数字整除。例如15是beautiful number,因为15可以被1整除,也可以 ...
分类:其他好文   时间:2020-04-17 18:39:23    阅读次数:57
575. Distribute Candies
Problem : Given an integer array with even length, where different numbers in this array represent different kinds of candies. Each number means one c ...
分类:其他好文   时间:2020-04-17 00:23:13    阅读次数:77
496. Next Greater Element I
You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all the next greater numbers for nums1' ...
分类:其他好文   时间:2020-04-15 15:17:52    阅读次数:68
CF-div3-635-E - Three Blocks Palindrome| 二分
代码 ...
分类:其他好文   时间:2020-04-15 15:11:50    阅读次数:47
9163条   上一页 1 ... 27 28 29 30 31 ... 917 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!