摘要:
花了一周的时间把琅琊榜看完,算是对琅琊榜的敬畏吧。 之前看到电视剧,觉得电视剧拍的挺好的。所以就把书找来看了。 看完之后感慨万千。 在知乎上找到了人物关系图。 给我的感触是,你可能有理想,可能理想很大,看着不可能实现,但是坚持脚踏实地,步步为营,最终你会实现你的梦想。 阅读全文
posted @ 2018-04-24 13:40
alittlecomputer
阅读(1582)
评论(0)
推荐(0)
摘要:
选择排序(Selection sort) 选择排序是现在一系列数组中找到最小的,放到数组的第一个位置,然后选择第二小的,放到第二个位置。 如果未排序的数组为a,第一轮是先比较a[0]和a[1]的大小,如果a[0]>a[1],那么两个交换,否则不交换。这样得到的是a[0]是较小的那一个数。 然后把a[ 阅读全文
posted @ 2018-04-14 22:26
alittlecomputer
阅读(415)
评论(0)
推荐(0)
摘要:
Given a 32-bit signed integer, reverse digits of an integer. Example: Example: Example: 代码如下: 阅读全文
posted @ 2018-04-13 10:38
alittlecomputer
阅读(119)
评论(0)
推荐(0)
摘要:
锯齿形排列 其实就是找到规律就行。 代码如下: 阅读全文
posted @ 2018-04-12 11:44
alittlecomputer
阅读(108)
评论(0)
推荐(0)
摘要:
最长回文子串 回文字符串的长度若是奇数,那么回文的中间一个单字符,两边对称。回文字符串的长度若是偶数,那么中间是两个字符一样,然后两边对称。 我们用的方法如下: 主要思路是找到一位然后向两边扩展,找到最大的长度。 阅读全文
posted @ 2018-04-12 09:51
alittlecomputer
阅读(127)
评论(0)
推荐(0)
摘要:
代码如下: 这个有点复杂,看不太懂。 中位数是要把有序的数组分成两个等长的部分。 我们首先把数组A分成两个等长的部分: 数组A公有m个元素,所以公有m+1种分法。 而且我们知道,左边的长度为i,右边的长度为m-i。当i=0时左边是空的,当i=m时,右边是空的。即: 同样的,我们可以对B进行划分: 我 阅读全文
posted @ 2018-04-11 16:49
alittlecomputer
阅读(98)
评论(0)
推荐(0)
摘要:
Given a string, find the length of the longest substring without repeating characters. Example: Given "abcabcbb", the answer is "abc", which the lengt 阅读全文
posted @ 2018-04-11 11:12
alittlecomputer
阅读(143)
评论(0)
推荐(0)
摘要:
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contai 阅读全文
posted @ 2018-04-10 23:00
alittlecomputer
阅读(98)
评论(0)
推荐(0)
摘要:
Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have ex 阅读全文
posted @ 2018-04-10 20:58
alittlecomputer
阅读(138)
评论(0)
推荐(0)
摘要:
今天和金科、韩超还有忍忍一起去一个医院去看老奶奶。 医院的位置在上海市保德路1278号。这里有几个基督徒老奶奶。都是上海人,她们得了大麻风病。就是四肢上起皮,皮肤比较干。容易传染的一种病,好在她们都差不多好了。今天和她们聊了很多,感觉她们的信心很坚固。她们信主20多年,老奶奶都七八十岁了。她们还唱了 阅读全文
posted @ 2018-04-06 23:23
alittlecomputer
阅读(435)
评论(0)
推荐(0)
摘要:
闰年,大家都知道,例如2018年不是是闰年,所以,2月份没有有29号。2020年是闰年,所以2月份有29号。 闰年是每隔四年有一个闰年吗? 不是,因为2000年是闰年,但是1900年不是闰年,但是之间相差250个4年。 闰年的计算方法相信大家都知道。 闰年有两个条件: 但是可能很多人不知道为什么闰年 阅读全文
posted @ 2018-04-05 18:54
alittlecomputer
阅读(1440)
评论(0)
推荐(0)