Add function level_width
Optimize level_width to speed up the execution
Add topological sort for case 4
Add case4_1
Add case3_list