summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-07-05Dijkstra shortest path done, using PriorityQueue. Don't give up! Very rewarding!HEADmasterHaidong Ji
2020-07-19Bipartite check done! One of the problems with my code was I ran bfs for all ↵Haidong Ji
vertex, whereas checking just one is enough! Happy I got it done!
2020-07-16BFS distance done. Following pseudo code, not too bad.Haidong Ji
2020-07-14Strongly Connected Component done. It's easy after I struggled with ↵Haidong Ji
topological sorting.
2020-07-12Finally Topological sort done! I started from scratch and used Array, not ↵Haidong Ji
ArrayList, in dfs and explore methods, which helped! I also used IntStream and boxed method to do clever post order array sorting.
2020-07-10Checking in implementation with stack. Didn't pass the grader. I'm checking ↵Haidong Ji
in first and then start from scratch.
2020-05-23Topological sort not done yet. The program is correct but not efficient. I ↵Haidong Ji
may need to convert the recursive DFS to iterative DFS. Check in now so I can get the code from the computer upstairs.
2020-05-20Check if DAG (Directed Acyclic Graph) done. In the exercise it's Checking ↵Haidong Ji
Consistency of CS Curriculum. For the clock variable to assign pre-visit and post-visit values, I used a trick of defining the clock as int[1], so its mutable and I can increment it. I don't know if that's a best practice, but for now I'm happy that the program is good. Fun stuff!
2020-05-16ConnectedComponents (Adding Exits to Maze) done. I didn't build my test ↵Haidong Ji
cases properly initially: when v and w are connected, they should be in each other's ArrayList. Once that's fixed, it was easy.
2020-05-10Reachability done. I found it much easier to work with Java than Python. I ↵Haidong Ji
tried to start with Python but found it difficult to get started.