MCPcopy Create free account
hub / github.com/Ayu-99/Data-Structures / inorderTraversal

Method inorderTraversal

Trees/Inorder Traversal Iterative.cpp:54–76  ·  view source on GitHub ↗

void inorder(TreeNode* root, vector &s){ if(root->left!=NULL){ inorder(root->left, s); } s.push_back(root->val); if(root->right!=NULL){ inorder(root->right, s); } } vector inorderTraversal(TreeNode* root) { vector s; if(root!=NULL){ inorder(root, s);

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 4

emptyMethod · 0.45
pushMethod · 0.45
topMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected