PS: The contents below are abstracted from "Introduction to algorithms (third edition)"
The proof of the master theorem is omitted because it is so hard to understand. If you are interesting in it, you can refer to "Introduction to algorithms (third edition)".