MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / saveNode

Function saveNode

CPP/Trees/kthMinimumElement.cpp:31–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29 return node;
30}
31void saveNode(struct node *root, vector<struct node *> &nodes)
32{
33 if (root == NULL)
34 return;
35
36 saveNode(root->left, nodes);
37 nodes.push_back(root);
38 saveNode(root->right, nodes);
39}
40
41int findKthMin(struct node *root, int k)
42{

Callers 1

findKthMinFunction · 0.85

Calls 1

push_backMethod · 0.80

Tested by

no test coverage detected