LeetCode note Aug-4

297. [H]Serialize and Deserialize Binary Tree

    Read More

    coding note 8 Data Structure

    hash

    ###Collision:

    • open hash(LinkedList)
    • closed hash(Array)(no delete)

    Read More

    HashMap Source Code Review(Java 8)

    TreeNode & Node

    HashMap in java 8 is different from the older version on the Entry. In java 8 version, when there are many nodes in one hash unit(default is more than 8), the Entry is convert to TreeNode type, and then use tree to add, delete and find. When the nodes become less(default is 6), the entry will then convert from TreeNode to normal Entry.

    Read More