摘要: EventBus Less code, better quality. "与otto对比" EventBus是一个Android端优化的publish/subscribe消息总线,简化了应用程序内各组件间、组件与后台线程间的通信。比如请求网络,等网络返回时通过Handler或Broadcast通知U 阅读全文
posted @ 2016-07-18 14:54 Live and Learn 阅读(1098) 评论(0) 推荐(0) 编辑
摘要: Difficulty: Medium Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors 阅读全文
posted @ 2016-06-20 18:26 Live and Learn 阅读(267) 评论(0) 推荐(0) 编辑
摘要: Total Accepted: 76162 Total Submissions: 352104 Difficulty: Easy Rotate an array of n elements to the right by k steps. For example, with n = 7 and k 阅读全文
posted @ 2016-06-14 16:16 Live and Learn 阅读(104) 评论(0) 推荐(0) 编辑
摘要: Total Accepted: 20180 Total Submissions: 57018 Difficulty: Easy Write a function that takes a string as input and reverse only the vowels of a string. 阅读全文
posted @ 2016-06-14 11:14 Live and Learn 阅读(92) 评论(0) 推荐(0) 编辑
摘要: Total Accepted: 34109 Total Submissions: 58119 Difficulty: Easy Write a function that takes a string as input and returns the string reversed. Example 阅读全文
posted @ 2016-06-14 11:13 Live and Learn 阅读(92) 评论(0) 推荐(0) 编辑
摘要: Total Accepted: 122406 Total Submissions: 356377 Difficulty: Easy Given an array and a value, remove all instances of that value in place and return t 阅读全文
posted @ 2016-06-14 11:12 Live and Learn 阅读(107) 评论(0) 推荐(0) 编辑
摘要: Total Accepted: 71150 Total Submissions: 308672 Difficulty: Medium Given a list, rotate the list to the right by k places, where k is non negative. Fo 阅读全文
posted @ 2016-06-07 18:11 Live and Learn 阅读(126) 评论(0) 推荐(0) 编辑
摘要: Total Accepted: 111864 Total Submissions: 374606 Difficulty: Easy Given a linked list, remove the nth node from the end of list and return its head. F 阅读全文
posted @ 2016-06-07 11:39 Live and Learn 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 参考http://blog.verypod.com/shell-sort-using-java/ http://blog.csdn.net/shan9liang/article/details/7533466 排序算法早就学习过,无奈长时间不看还是有很多知识变的模糊。从今天开始每天回顾一下那些年学过的算法。今天回顾的是直接插入排序。在算法的结构中直接插入排序属于插入排序的一种,和直接插入排序同属插入排序的是希尔排序。关系如下: 直接插入排序的基本操作是:将一个记录插入到已经排好序的有序表中, 得到一个新生成的有序表。当所有待排序的记录都插入得到新生成的有序表中时,排序结束。j... 阅读全文
posted @ 2013-03-21 17:32 Live and Learn 阅读(161) 评论(0) 推荐(0) 编辑
摘要: Live and Learn,学无止境。希望在园子里记录我学到的知识。每天坚持把学到的知识总结归纳在这里。借此勉励自己不断学习。 阅读全文
posted @ 2013-03-18 11:00 Live and Learn 阅读(118) 评论(0) 推荐(0) 编辑