Using an iterative approach, write a function find_node(bst_node* root, int target) that returns the node with the given target value in a BST. — bst_node* find_node(bst_node* root, int target) { while (root != NULL && root->key != target) { if (root->key > target) { root = root->left; } else { root = root->right; } } return root; }
G
1.2K
Google Interview
This flashcard deck made by jwasham contains knowledge about google interview. For more details, please follow https://github.com/jwasham/google-interview-university