码迷,mamicode.com
首页 >  
搜索关键字:guess numbers    ( 8263个结果
【剑指offer32 把数组排成最小的数】
题目描述 输入一个正整数数组,把数组里所有数字拼接起来排成一个数,打印能拼接出的所有数字中最小的一个。例如输入数组{3,32,321},则打印出这三个数字能排成的最小数字为321323。 先将数组的元素排序(按字符序排) 然后从头到尾连接就可以 class Solution { public: st ...
分类:编程语言   时间:2020-06-15 11:48:55    阅读次数:56
Leetcode: 902. Numbers At Most N Given Digit Set
descption We have a sorted set of digits D, a non-empty subset of {'1','2','3','4','5','6','7','8','9'}. (Note that '0' is not included.) Now, we writ ...
分类:其他好文   时间:2020-06-13 17:10:49    阅读次数:64
codeforces Round 646(div. 2)
Odd Selection Subsequence Hate Game On Leaves Guess The Maximums Tree Shuffling A、Odd Selection 题意: $n$个数选$x$个数能不能使它们的和是奇数。 题解: 按奇偶分一波情况就行。 AC代码: 1 #i ...
分类:其他好文   时间:2020-06-13 14:33:52    阅读次数:74
LeetCode 91 动态规划 Decode Ways 解码方法
LeetCode 91 动态规划 Decode Ways 解码方法LeetCodeA message containing letters from A-Z is being encoded to numbers using the following mapping:'A' -> 1'B' -> ... ...
分类:其他好文   时间:2020-06-13 00:18:17    阅读次数:56
stylus
stylus是什么? 1. stylus是css预处理器,具有对css可编程,编写快速便捷的特性. 2. stylus源自于Node.js ,2010年产生 , 主要用来给Node项目进行css预处理支持 . stylus应用场景? 1.标准的stylus语法就是没有花括号,没有分号,没有冒号 , ...
分类:其他好文   时间:2020-06-11 13:22:35    阅读次数:92
字符串格式化:数字转成英文格式
1 function formatNumber1 (number) { const base = 3 number = Number(number) // 只要包含字符 都会转为NaN let numberStr = number.toString() // NaN => 'NaN' if (num ...
分类:其他好文   时间:2020-06-09 16:12:47    阅读次数:71
append对len和cap的影响
package main import "fmt" func main() { var numbers []int printSlice(numbers) /* 允许向空切片追加元素 */ numbers = append(numbers, 0) printSlice(numbers) /* 向切片 ...
分类:移动开发   时间:2020-06-09 09:21:48    阅读次数:69
令牌token
from itsdangerous import TimedJSONWebSignatureSerializer as Serializer# 第一个参数是一个密钥, 第二个参数过期时间s = Serializer("hard to guess", expires_in=3600)# 为指定的数据生 ...
分类:其他好文   时间:2020-06-07 21:39:40    阅读次数:71
只出现一次的数字 III
复习了原码、反码、补码,位运算(尤其是异或,Java记作【^】) a^b=b^a a^0=a a^a=0 a^b=c > a^b^b=c^b > a=c^b 注意:位运算时,符号位也是参与运算的。 给定一个整数数组 nums,其中恰好有两个元素只出现一次,其余所有元素均出现两次。 找出只出现一次的那 ...
分类:其他好文   时间:2020-06-06 21:56:13    阅读次数:77
简述TCP三次握手和四次挥手过程
TCP握手协议 在TCP/IP协议中,TCP协议提供可靠的连接服务,采用三次握手建立一个连接.第一次握手:建立连接时,客户端发送syn包(syn=j)到服务器,并进入SYN_SEND状态,等待服务器确认; SYN:同步序列编号(Synchronize Sequence Numbers)第二次握手:服 ...
分类:其他好文   时间:2020-06-06 11:17:49    阅读次数:50
8263条   上一页 1 ... 17 18 19 20 21 ... 827 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!