其实思路很简单,套用一下普通斐波那契数列的非递归做法即可,不过这个成绩我一定要纪念一下,哈哈哈哈哈 代码在这儿: class Solution: def tribonacci(self, n: int) -> int: a, b, c =0, 1, 1 if n is 0: return 0 if n is 1: return 1 if n is 2: return 1 for i in range(2, n): a, b ,c = b, c, a+b+c return c…
Memory Usage On linux, there are commands for almost everything, because the gui might not be always available. When working on servers only shell access is available and everything has to be done from these commands. So today we shall be checking th…
http://www.oracle.com/technetwork/java/javase/memleaks-137499.html 3.1 Meaning of OutOfMemoryError One common indication of a memory leak is the java.lang.OutOfMemoryError error. This error is thrown when there is insufficient space to allocate an ob…
High Level Tips for Redis Most of Stream-Framework's users start out with Redis and eventually move to Cassandra because Redis becomes too expensive to host. Stream, our hosted API for building scalable newsfeeds & activity streams is also based on C…
Shell script for logging cpu and memory usage of a Linux process http://www.unix.com/shell-programming-and-scripting/223177-shell-script-logging-cpu-memory-usage-linux-process.html…
That is because your web application has a memory leak. A common issue are "PermGen" memory leaks. They happen because the Classloader (and the Class objects it loaded) cannot be recycled unless some requirements are met (*). They are stored in…