摘要: 荒废好久没更新了,时间过得很快,转眼就2017年了,经历了苦闷的科研阶段,发了论文顺利毕业;也经过三地辗转奔波来去的找工作,最终还是犹犹豫豫选择了自己知道以后可能会后悔的,果然就后悔了。所以还是应该选择自己喜欢的,当然也许人总是会这样,总觉得没走的另一条路也许走起来更畅通。 Given an arr 阅读全文
posted @ 2017-03-03 15:30 echo_lsh 阅读(369) 评论(0) 推荐(0)
摘要: 题目:Determine whether an integer is a palindrome. Do this without extra space. 刚开始看到题目的时候想着用栈来处理,每进来一个数与栈顶元素比较相同则栈顶元素处栈,不同则元素入栈,最后栈为空或剩一个数为真,我是以“12343... 阅读全文
posted @ 2014-10-15 16:29 echo_lsh 阅读(202) 评论(0) 推荐(0)
摘要: 1. 电话里,T告诉我,他为了一件忍无可忍的事,终于发脾气骂人了。 我问他,发了脾气以后,会后悔吗? 他说:“我要学着不后悔,就好像摔了一个茶杯之后又百般设法要再粘起来的那种后悔,我不要。” 我静静地聆听着朋友低沉的声音,心里忽然有种怅惘的感觉。 我们在少年时原来都有着单纯与宽厚的灵魂的啊... 阅读全文
posted @ 2014-09-25 10:39 echo_lsh 阅读(162) 评论(0) 推荐(0)
摘要: You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ... 阅读全文
posted @ 2014-09-23 14:44 echo_lsh 阅读(142) 评论(0) 推荐(0)
摘要: Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two n 阅读全文
posted @ 2014-09-22 22:01 echo_lsh 阅读(151) 评论(0) 推荐(0)
摘要: Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo... 阅读全文
posted @ 2014-09-22 21:49 echo_lsh 阅读(201) 评论(0) 推荐(0)
摘要: 刚接触python不久,被python的简洁强大迷倒了,在做leetcode,Reverse words in a string时,刚开始还是传统的思路想着怎么处理空格问题一直测试不通过,写的很罗嗦被师弟吐槽说你写的代码好丑,好心塞。 废话不多说直接奉上思路代码: 翻转字符串如:"Hello I a 阅读全文
posted @ 2014-09-19 14:21 echo_lsh 阅读(323) 评论(0) 推荐(0)