11 2017 档案
摘要:Given an array, find the int that appears an odd number of times. There will always be only one integer that appears an odd number of times. 题目意思是给定一个
阅读全文
摘要:1.字符方法: str.charAt(): 可以访问字符串中特定的字符,可以接受0至字符串长度-1的数字作为参数,返回该位置下的字符,如果参数超出该范围,返回空字符串,如果没有参数,返回位置为0的字符; str.charCodeAt(): 和charAt()用法一样,不同的是charCodeAt()
阅读全文
摘要:让日期区间更友好! 把常见的日期格式如:YYYY-MM-DD 转换成一种更易读的格式。 易读格式应该是用月份名称代替月份数字,用序数词代替数字来表示天 (1st 代替 1). 记住不要显示那些可以被推测出来的信息: 如果一个日期区间里结束日期与开始日期相差小于一年,则结束日期就不用写年份了;在这种情
阅读全文