![if the value is found in any of the subtrees, it is propagated up so that in the end it is returned, otherwise null is returned](img/6b854cf280b11a6cab8c1ac2e97186ec.png"Search operation in BST")
If the value is found in any of the subtrees, it is propagated up so that in the end it is returned, otherwise null is returned
如果在任何子树中找到该值,则将其向上传播,以便最后返回,否则返回`null`。
...
...
@@ -136,7 +136,7 @@ Insert 4 as a left child of 6
![Image showing the importance of returning the root element at the end so that the elements don't lose their position during the upward recursion step.](img/ce2d9cee5465f26c3b802e5d6da4dd1d.png"Insertion operation on a BST")
Image showing the importance of returning the root element at the end so that the elements don't lose their position during the upward recursion step.
![graph data structure explained using facebook's example. Users, groups, pages, events, etc. are represented as nodes and their relationships - friend, joining a group, liking a page are represented as links between nodes](img/85cd94ece58965f7646c95b7496418ba.png"Example of graph data structure")
@@ -70,7 +70,7 @@ Vertex 2 has an unvisited adjacent vertex in 4, so we add that to the top of the
![After we visit the last element 3, it doesn't have any unvisited adjacent nodes, so we have completed the Depth First Traversal of the graph.](img/c6b4ab621d2161bf1c6b2bbe94020da2.png"A DFS example")
After we visit the last element 3, it doesn't have any unvisited adjacent nodes, so we have completed the Depth First Traversal of the graph.
![on the left, there is a graph and on the right there is an array representation of the same graph to compare equivalent indices](img/54db1979822031a282d59faef672e35d.png"Comparison between array and heap indices")
@@ -48,13 +48,12 @@ Go to each vertex and update its path length
![If the path length of the adjacent vertex is lesser than new path length, don't update it](img/9c1101cb0ca5e466b0964ca9f58d9adc.png"Dijkstra's algorithm steps")
If the path length of the adjacent vertex is lesser than new path length, don't update it
如果相邻顶点的路径长度小于新路径的长度,请不要更新它
![Avoid updating path lengths of already visited vertices](img/b961908028a33489992e43ed5d3937c6.png"Dijkstra's algorithm steps")
Avoid updating path lengths of already visited vertices
![Choose the edge with the least weight, if there are more than 1, choose anyone](img/1c59d11ae3cf6a1272c0bbfb7fbff158.png"Kruskal's algorithm example ")
Choose the edge with the least weight, if there are more than 1, choose anyone
![JRE contains JVM and class libraries and JDK contains JRE, compilers, debuggers, and JavaDoc](img/e81a27912388282d5dc563dda1cdf750.png"Relationship between JVM, JRE, and JDK")