Data structure visualizer
Works like a whiteboard that runs your code. Predict what an algorithm will do, then watch it run step by step.
Works like a whiteboard that runs your code. Predict what an algorithm will do, then watch it run step by step.
0 of 4 right
Starting at G, in what order does breadth first search visit the nodes? Take each node's neighbours in alphabetical order.
Input
A-B, A-D, A-F, A-G, C-F, D-E, D-F, D-G, E-F
Insert these values in order into an empty binary search tree, then delete 37. When a node has two children, replace it with its in-order successor. Write the finished tree level by level: the root, then each row left to right.
Input
37, 77, 28, 41, 47, 89, 94, 42
Insert these values one at a time into an empty min-heap. What does the heap's array look like at the end?
Input
36, 57, 25, 56, 18, 28, 41
Binary search looks for 48 in this sorted array, with mid = floor((lo + hi) / 2). How many middle elements does it check before it gives up?
Input
7, 11, 16, 26, 30, 34, 42, 49, 51, 57, 59, 71, 92