码迷,mamicode.com
首页 >  
搜索关键字:reverse integer    ( 19410个结果
【刷题-LeetCode】209. Minimum Size Subarray Sum
Minimum Size Subarray Sum Given an array of n positive integers and a positive integer s, find the minimal length of a contiguous subarray of which th ...
分类:其他好文   时间:2020-07-16 18:17:25    阅读次数:57
重写equals为什么要重写hashcode
三个方面去理解“重写equals为什么要重写hashcode”: 1.Object中hashCode()的源码注释 1. 源码 hashCode()的注释的最后一段的括号中写道:将对象的地址值映射为integer类型的哈希值。 2. 源码 equals()的注释:当我们将equals方法重写后有必要 ...
分类:其他好文   时间:2020-07-16 11:45:29    阅读次数:53
【leetcode_easy_array】1394. Find Lucky Integer in an Array
problem 1394. Find Lucky Integer in an Array solution #1: 使用哈希表; 使用哈希表记录数组元素和freq,然后判断是否相等,且取最大值; 注意 1. 最大值可以由下标一次递减隐性表示; 2. 数值的范围是1-500; 参考 1. leetco ...
分类:其他好文   时间:2020-07-16 00:22:19    阅读次数:51
es6语法
反转字符: //反转一串字符 export default (str)=>{ let arr=str.split(' ') let result=arr.map(item=>{ return item.split('').reverse().join('') }) return result.joi ...
分类:其他好文   时间:2020-07-16 00:14:19    阅读次数:58
【HDU3709】平衡数Balanced Number
Description A balanced number is a non-negative integer that can be balanced if a pivot is placed at some digit. More specifically, imagine each digit ...
分类:其他好文   时间:2020-07-16 00:05:52    阅读次数:79
【DP练习】B-number(HDU3652)
Description A wqb-number, or B-number for short, is a non-negative integer whose decimal form contains the sub- string "13" and can be divided by 13. ...
分类:其他好文   时间:2020-07-15 23:20:22    阅读次数:96
461. 汉明距离
地址:https://leetcode-cn.com/problems/hamming-distance/ <?php /** 两个整数之间的汉明距离指的是这两个数字对应二进制位不同的位置的数目。 给出两个整数 x 和 y,计算它们之间的汉明距离。 注意: 0 ≤ x, y < 231. 示例: 输 ...
分类:其他好文   时间:2020-07-15 22:55:36    阅读次数:57
C#泛型学习
泛型是泛+型,目的是为了节省代码的重复,可以复用代码。 场景: 定义了两个方法(函数) public int DisplayMyInteger(int myInt) { return myInt; } public string DisplayMyString(string myStr) { ... ...
分类:Windows程序   时间:2020-07-15 16:02:06    阅读次数:76
LeetCode415 字符串相加
给定两个字符串形式的非负整数 num1 和num2 ,计算它们的和。 注意: num1 和num2 的长度都小于 5100.num1 和num2 都只包含数字 0-9.num1 和num2 都不包含任何前导零。你不能使用任何內建 BigInteger 库, 也不能直接将输入的字符串转换为整数形式。 ...
分类:其他好文   时间:2020-07-15 01:10:57    阅读次数:59
532. K-diff Pairs in an Array
Given an array of integers and an integer k, you need to find the number of unique k-diff pairs in the array. Here a k-diff pair is defined as an inte ...
分类:其他好文   时间:2020-07-15 01:00:03    阅读次数:73
19410条   上一页 1 ... 44 45 46 47 48 ... 1941 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!