摘要: 给定一个单词集合Dict,其中每个单词的长度都相同。现从此单词集合Dict中抽取两个单词A、B,我们希望通过若干次操作把单词A变成单词B,每次操作可以改变单词的一个字母,同时,新产生的单词必须是在给定的单词集合Dict中。求所有行得通步数最少的修改方法。 举个例子如下:Given: A = "hit... 阅读全文
posted @ 2014-10-14 18:26 yutoulck 阅读(225) 评论(0) 推荐(0) 编辑
摘要: current遍历,整个数组序列,current指1不动,current指0,与begin交换,而后current++,begin++,current指2,与end交换,而后,current不动,end--。http://blog.csdn.net/v_july_v/article/details/... 阅读全文
posted @ 2014-10-14 17:56 yutoulck 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 链表相交需要判断有无循环,无循环直接找最后一个节点进行比较,有循环找某个循环点然后看看另一条是否也有这个点。找循环链表入口比较牛逼:在p2和p1第一次相遇的时候,假定p1走了n步,环路的入口是在h步的时候经过的,那么有 p1走的路径: h+c = n; c为p1和p2相交点,距离环路入口的距离 p2... 阅读全文
posted @ 2014-10-14 17:18 yutoulck 阅读(335) 评论(0) 推荐(0) 编辑
摘要: 要点:AsyncTask主要用于short operations (a few seconds at the most.)。如果你需要“running for long periods of time”,官方推荐使用various APIs provided by the java.util.con... 阅读全文
posted @ 2014-05-09 13:57 yutoulck 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 在Android内部有一套自己图片处理的机制,类似android.graphics.Canvas等等,使用它足以完成标题中的任务。首先,我们要先生成一个Bitmap文件,以此作为画布:Bitmap pic = Bitmap.createBitmap(400, 400, Bitmap.Config.A... 阅读全文
posted @ 2014-04-25 13:50 yutoulck 阅读(547) 评论(0) 推荐(0) 编辑
摘要: http://developer.android.com/guide/components/bound-services.htmlBound Services通常是以CS的形式服务的,它一般只在被客户端需要的时候才存活,而不会一直存在于后台。客户端想要绑定必须调用bindService(). 同时必... 阅读全文
posted @ 2014-04-23 21:37 yutoulck 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 阿里巴巴笔试的时候遇到了这个题,在网上找到了一篇好文,特地转发至此。http://sxnuwhui.blog.163.com/blog/static/137068373201242374810542/http://www.doc88.com/p-911955355117.html 阅读全文
posted @ 2014-04-23 19:43 yutoulck 阅读(122) 评论(0) 推荐(0) 编辑
摘要: http://11643599.blog.hexun.com/37186626_d.html 阅读全文
posted @ 2014-04-20 10:31 yutoulck 阅读(144) 评论(0) 推荐(0) 编辑
摘要: http://dhjboy.blog.hexun.com/28912287_d.html 阅读全文
posted @ 2014-04-11 20:38 yutoulck 阅读(100) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/dongpy/article/details/4552062 阅读全文
posted @ 2014-04-11 19:35 yutoulck 阅读(230) 评论(0) 推荐(0) 编辑