• LeetCode "198. House Robber"

    LeetCode link first thought Using DP. Build a int[][] to save the maximum between i to j. solution 12345678910111213141516171819202122232425class Solution &...

    LeetCode "297. Serialize and Deserialize Binary Tree"

    LeetCode link first thought Consider it as a complete binary tree. Using the relation between level and index in the CBT. solution 1234567891011121314151617...

    LeetCode "99. Recover Binary Search Tree"

    LeetCode link first thought It’s similar to valid BST, using DFS to find the two invalid nodes and save them to a list. solution 123456789101112131415161718...

    流(Streams),Sockets和端口(Ports)

    使用底层Unix特性来管理文件,进程及网络的输入和输出。 主题 流(Streams)1class Stream 表示流的抽象类。 1class InputStream 提供只读功能的流。 1class OutputStream 提供只写功能的流 1protocol StreamDelegate 流实例的代理用来...

    LeetCode "95. Unique Binary Search Trees II"

    LeetCode link first thought The same as problem 1 How to save the node list is need to consider carefully. The same root value may contains different sub nod...

    LeetCode "96. Unique Binary Search Trees"

    LeetCode link first thought Selected 1…n as the root For each selection, the count is the multiplication of the count of it’s left sub tree and the right(DFS...

    LeetCode "546. Remove Boxes"

    LeetCode link first thought The same as Matrix chain multiplication, the maximum value from i to j is equal to the max of it’s sub cases. choose i ,choose ...

    进程(Processes)与线程(Threads)

    管理你应用与主操作系统及其他进程之间的交互,以及实现底层并发特性(low-level concurrency features)。 主题 Run Loop 安排(Run Loop Scheduling)1class RunLoop 用于管理输入源的对象的编程接口。 1class Timer 在一段时间间隔之后触...

    对象运行时(Object Runtime)

    获取Object-C特性,Cocoa设计模式以及Swift一体化的底层支持。 主题 对象基础1class NSObject 大多数Objective-C类层级的根类,子类继承了运行时系统的基本接口以及表现为Objective-C对象的能力。 1protocol NSObjectProtocol 对所有Objec...

    Matrix Chain Multiplication

    GeeksForGeeks link first thought Build a 2d array, represent the minimum from i to j. i and j are the split index of the input. Distance between i and j must...