摘要: There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity sh 阅读全文
posted @ 2017-12-28 22:35 jeysin 阅读(159) 评论(0) 推荐(0) 编辑
摘要: Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the leng 阅读全文
posted @ 2017-12-28 17:44 jeysin 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 题目描述 输入一个正整数数组,把数组里所有数字拼接起来排成一个数,打印能拼接出的所有数字中最小的一个。例如输入数组{3,32,321},则打印出这三个数字能排成的最小数字为321323。 思路:自定义排序规则,将数组排好序之后顺序输出就是结果 1 class Solution { 2 public: 阅读全文
posted @ 2017-12-28 15:37 jeysin 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 题目描述 数字按照0123456789101112131415161718192021...的顺序排列。第5位(从0开始计数)为5,第13位为1,第19位为4…… 求任意第n位对应的数字 阅读全文
posted @ 2017-12-28 13:45 jeysin 阅读(371) 评论(0) 推荐(0) 编辑
摘要: 题目描述 求出1~13的整数中1出现的次数,并算出100~1300的整数中1出现的次数?为此他特别数了一下1~13中包含1的数字有1、10、11、12、13因此共出现6次,但是对于后面问题他就没辙了。ACMer希望你们帮帮他,并把问题更加普遍化,可以很快的求出任意非负整数区间中1出现的次数。 感觉《 阅读全文
posted @ 2017-12-28 10:48 jeysin 阅读(219) 评论(0) 推荐(0) 编辑