Completed BFS and CC. Fixed typo in CC, you put \!marked[v] instead of \!marked[w].