The total number of nodes in the tree is equal to the sum of the nodes on all the levels: nodes n.
The time complexity of BFS, or DFS, on a graph is O(V+E) because we traverse all the nodes and edges of the graph. (I get that) But for a binary tree, the time complexity of BFS and DFS is O(V)... Why is that?
All trees have n - 1 edges, n being the number of nodes. The time complexity is still technically O(V + E), but that equates to O(n + (n-1)) = O(n).
O(n*l) where n = number of words inserted in Trie and l = length of longest word inserted in Trie.

