Question d’entretien chez Splunk

How would you print the nodes in a tree using DFS?

Réponse à la question d'entretien

Utilisateur anonyme

23 févr. 2014

void dfs(struct node *root) { if(root == null) { return; } else { dfs(root->left); printf("element: %d",root->data ); dfs(root->right); } }