上一页 1 2 3 4 5 6 7 8 9 ··· 13 下一页
摘要: 小结: 背单词和上统计课的计划因为受到晚起的影响而严重搁置。 体重维持在59 公斤,但明显感觉有逐渐走向腹型肥胖的趋势。 习惯: 基本养成刻意制造连续专注的工作时间的习惯,把手机调成勿扰模式,推出QQ 和微信,必要时设置番茄钟,尽量让自己处于不被打断的状态,工作效率大大提升。 刷微博的时间相较上个月 阅读全文
posted @ 2016-07-31 23:38 Agentgamer 阅读(135) 评论(0) 推荐(0)
摘要: 最近有客户想要处理webp 的动图,情况当然是我们并不能处理webp 格式的图片。这事就交给了我来折腾,一开始想着用瑞士军刀ffmpeg。结果是折腾了差不多一天,前前后后编译了几十次ffmpeg 源码后才发现,并不支持decode 带动画的webp....坑爹啊。 不过也算熟悉了一下源码编译的过程, 阅读全文
posted @ 2016-06-01 20:35 Agentgamer 阅读(3403) 评论(0) 推荐(0)
摘要: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may comple 阅读全文
posted @ 2016-04-20 20:29 Agentgamer 阅读(147) 评论(0) 推荐(0)
摘要: Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction 阅读全文
posted @ 2016-04-19 12:17 Agentgamer 阅读(107) 评论(0) 推荐(0)
摘要: 最近开始研究http 特别是multipart 表单,想弄明白他是怎么work 的。在nodejs 里,可以使用form-data 来组合一个multipart 表单,然后使用http.request 发送出去 在服务端就可以接受到post 过去的表单内容(node 可以使用multiparty 中 阅读全文
posted @ 2016-04-18 18:20 Agentgamer 阅读(453) 评论(1) 推荐(1)
摘要: Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST. According to the definition of LCA on Wikipedia 阅读全文
posted @ 2016-04-08 18:40 Agentgamer 阅读(161) 评论(0) 推荐(0)
摘要: 需求 在写小工具的时候,经常遇到需要从mongodb 里面查东西来用,因为要跟其他bash 工具链结合在一起用,所以最理想的方法是能够在shell 上执行查询,然后pipe 给接下来的工具做处理。方案 幸运的是对于mongo 来说做起来是很方便的,只需要使用mongo --eval 即可。例1:... 阅读全文
posted @ 2015-11-25 14:47 Agentgamer 阅读(4483) 评论(1) 推荐(1)
摘要: Reverse a linked list from positionmton. Do it in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m= 2 andn= 4,return1->4->3->2->5->NULL.No... 阅读全文
posted @ 2015-10-25 12:44 Agentgamer 阅读(159) 评论(0) 推荐(0)
摘要: Reverse a singly linked list.这题因为palindrome linked list 的时候需要就顺便做了一下。利用三个指针:prev, now, next 相互倒腾就行。/** * Definition for singly-linked list. * function... 阅读全文
posted @ 2015-10-25 00:48 Agentgamer 阅读(135) 评论(0) 推荐(0)
摘要: Given a singly linked list, determine if it is a palindrome.一开始想用栈,但是试来试去发现写不出来遂放弃,后来想想再不济可以转换成数组然后分别两头扫,但是这样就用了O(n) 的空间,再进一步,可不可以在链表里模拟呢。思前想后发现是可以的,只... 阅读全文
posted @ 2015-10-24 22:15 Agentgamer 阅读(176) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 ··· 13 下一页