10.15 打卡,2 hard 4medium
Course Schedule III 以deadline排序,然后用max heap保存courses,如果当前的课不能上就pop一个用时最长的
All Possible Full Binary Trees 典型的recursion
Design A Leaderboard 用个counter记录分数就行,优化可以用quickSelect
Binary Tree Coloring Game 本质是neighbor发散出去有多少个node
Number of Connected Components in an Undirected Graph UnionFind/DFS/BFS 都可以
Longest Substring with At Most K Distinct Characters sliding window + Counter
brute force exceeds time limitation
--> use dynamic programming
--> a smart way of extending the palindrome string also works
worst case time complexity O(n*n)