Hao's Blog

路漫漫其修远兮,吾将上下而求索

Unblock Netease Music

Listen to Netease Music when overseas

Overview 网易云音乐在海外很多歌都听不了,之前也是在网上看了很多教程来解决这个问题。每次做完之后都会忘,换电脑setup的时候就会重搞一遍,很是麻烦。这次记录一下步骤。 Steps Clone git repo git clone git@github.com:nondanee/UnblockNeteaseMusic.git Ping Netease server ping m...

Tarjan Algorithm

Find Strongly Connected Components

Overview Tarjan algorithm is used to find SCCs in a directed graph. Compared to Korasaju’s algorithm, it only DFS once and no need to transpose the graph. It has linear time complexity of O(|V|+|E|...

Red Black Tree

Implementation of Red-Black Tree using Go

终于要把这个坑填了 Overview Red-black trees is a variation of binary search tree to ensure that the tree is balanced. Its height is O(lg n), where n is the number of nodes in the tree. Operations like ...

BST

Implementation of BinarySearchTree using Go

好像好久没更了。。。 Overview BinarySearchTree是一个很基础的数据结构,每棵树由很多个TreeNodes和一个Root组成。Root也是一个TreeNode,他跟其他的TreeNode不同之处在于他的Pre为nil。每一个TreeNode只有两个child nodes,分别为Left和Right。Left小于等于parent,Right大于等于parent。...

计算机网络

复习中碰到的一些重要的点

子网 subnet 划分子网的原因 1.IP地址空间的利用率有时很低。一个A类地址网络可连接的主机有1000多万,但是经常这些IP地址并没有被用到。比如一个几百人的公司为了未来的发展申请了一个B类地址,会造成很多不必要的浪费。 2.给每一个物理网络分配一个网络好会使路由表变得太大因而是网络性能变坏。 3.两级IP地址不够灵活。新公司在没有申请到新的IP地址之前是无法连接到互联网的。 综上所述...

Goroutine and Concurrency

Goroutine 学习总结

为啥Go的mascot是一只gopher。。。 Overview This blog is a summary of 2012 Golang Concurrency talk. The slide can be found at this link What is concurrency? Concurrency is the composition of independen...

Hello, World!

第一篇blog

人生第一篇博客 不论什么语言,第一个程序永远都是Hello, World!。所以也遵循这个传统,第一篇博客命名为”Hello, World!”。 建博客这个想法其实已经有很久了,刚好借着放假实习的机会,把它弄了出来。 这个博客会包含挺多内容的,不止是一些学习方面的总结,也包括一些个人的感悟,随笔之类的。 希望自己做到“吾日三省吾身”,积极更博,最起码一周一次吧(希望不是fla...