算法
算法就是算法
yaoxinJJJ
这个作者很懒,什么都没留下…
展开
-
Decomposition and Reductions|cs61b 2019 lec 27 |图总结
Graph Problems So FarDepthFirstPaths.javaBreadthFirstPaths.javaDijkstrasSP.javaA*: Same as Dijkstra’s but with h(v, goal) added to priority of each vertex.LazyPrimMST.javaPrimMST.javaKruskalM...原创 2020-03-26 22:33:26 · 295 阅读 · 0 评论 -
Lecture 23: Graphs and Traversals | cs61b 2019
Lecture 23: Graphs and TraversalsTree TraversalsGraphsDepth First SearchBreadth First SearchTrees and TraversalsTree DefinitionA tree consists of:A set of nodes.A set of edges that connect...原创 2020-03-26 20:13:33 · 341 阅读 · 0 评论 -
Lecture 26: Minimum Spanning Trees | cs61b 2019
Lecture 26: Minimum Spanning TreesMST, Cut Property, Generic MST AlgorithmPrim’s AlgorithmKruskal’s AlgorithmSpanning TreesMST vs. SPTA shortest paths tree depends on the start vertex:Becau...原创 2020-03-26 13:54:14 · 340 阅读 · 0 评论 -
Lecture 25: Shortest Paths| CS 61B Data Structures, Spring 2019
CategoriesSummary So Far: DFS vs. BFSDijkstra’s AlgorithmDijkstra’s Correctness and RuntimeA*A* Heuristics (188 preview)demo1demo2>As we discussed last time, BFS would not be a good ch...原创 2020-03-25 22:59:42 · 293 阅读 · 0 评论 -
Lecture 24: Graphs II: Graph Traversal Implementations |cs61b 2019
Lecture 24: Graphs II: Graph Traversal ImplementationsTree and Graph TraversalsJust as there are many tree traversals:Preorder: DBACFEGInorder: ABCDEFGPostorder: ACBEGFDLevel order: DBFACEGg...原创 2020-03-25 15:30:31 · 289 阅读 · 0 评论 -
HW 3: Hashing| CS 61B Data Structures, Spring 2019
equalsAs mentioned in class, writing a proper equals method is a little tricker than it might sound at first blush. According to the Java language specification, your equals method should have the fo...原创 2020-03-25 01:07:38 · 213 阅读 · 0 评论 -
clab8 总结|CS 61B Data Structures, Spring 2019
实战总结Lab 8: HashMap/****************************************************************************** * Compilation: javac SeparateChainingHashST.java * Execution: java SeparateChainingHashST &l...原创 2020-03-25 00:55:03 · 496 阅读 · 0 评论 -
Range Searching and Multi-Dimensional Data|Quadtrees|K-d Trees|CS 61B Data Structures, Spring 2019
Multi-Dimensional DataMotivation: 2D Range Finding and Nearest NeighborsSuppose we want to perform operations on a set of Body objects in space?2D Range Searching: How many objects are in the high...原创 2020-03-23 15:41:54 · 264 阅读 · 0 评论 -
Prefix Operations and Tries | CS 61B Data Structures, Spring 2019
Data Structures SummaryThe problem we are presented: Given a stream of data, retrieve(搜索) information of interest.All of the data structures we have discussed so far have been to solve the search pr...原创 2020-03-23 03:16:09 · 522 阅读 · 0 评论 -
Heaps and PQs(The Priority Queue) | CS 61B Data Structures, Spring 2019
Heaps and PQs(The Priority Queue)The Priority Queue InterfaceIf we want to cared more about quickly finding the smallest or largest element instead of quickly searchingNow we come to the Abstract ...原创 2020-03-22 22:37:09 · 607 阅读 · 0 评论 -
Hashing | CS 61B Data Structures, Spring 2019
Hashingreading: 12.1, 12.2, 12.3, 12.4, 12.5, Algs 458-468, 478-479, 468-475 (extra)Lecture 19: HashingSet Implementations, DataIndexedIntegerSetInteger Representations of Strings, Integer Overfl...原创 2020-03-20 02:44:54 · 533 阅读 · 0 评论 -
Red Black Trees | CS 61B Data Structures, Spring 2019
Red Black Trees | CS 61B Data Structures, Spring 2019reading:11.4, 11.5, Algs 424-431, 432-448 (extra)Why we need Red black TreesWonderfully balanced as they are, B-Trees are really difficult to im...原创 2020-03-19 19:23:11 · 658 阅读 · 0 评论 -
B-Trees|CS 61B Data Structures, Spring 2019
B-Trees原创 2020-03-19 03:04:54 · 190 阅读 · 0 评论