This question may be simple for experts but for a beginner like me it is important. My question is are there any problems involving tree traversals that can be solved by BFS , DFS and not in-order, pre-order etc. In other words, whenever i see a tree problem, should I ONLY think of the 3 tree traversal methods, or also consider BFS,DFS
Yes, you should absolutely apply for the role again. There are so many factors as to why you didn't get the job or interview. By the time you applied they might have already been in the final stages of the interview with their ideal candidate but then the candidate backed out.
But how long should you wait before applying for the same job again? You should wait at least 3 months before applying for the same job again. If the position is still open at this time, it's a good reminder that you are eager for the role. If the application closed then opened up again, don't hesitate to re-apply.
If you've had 1 rejection, you must wait 7 days until you can reapply. If you've had 2 rejections, you must wait 21 days until you can reapply.
There's no reason not to apply to the same company twice. Just be sure to go about it strategically. Sometimes, we set our sights on certain companies to work for, only to have those same companies reject us the first time we apply.
Pre-order, in-order and post-order traversal are the three different kinds of depth first search that are possible. So it's not a question of whether to use DFS or one of those three. If you are using one of those three traversals, you are using DFS.
As for whether there are cases where BFS is preferable over DFS: Yes, there are. For example to find the shortest path between two nodes in an unweighted graph, you can use BFS because the first path found by a BFS happens to be the one with the fewest edges. The same is not true for DFS.
An obvious example where DFS doesn't work and you have to use BFS is an infinitely (or at least arbitrarily) high tree.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With