DEV Community

Mahima Singh
Mahima Singh

Posted on

#Day 12: BFS and DFS, Complexity

Since I was not at all confident in finding the complexity og my programs, I practiced these type of questions from https://medium.com/@manishsundriyal/overview-time-space-complexity-f973513b701e .
This is really nice. I solved all of them correctly except the recursive Fibonacci series.

Also, I came across Swap Nodes problem on HackerRank. As I had completely no idea how to solve it, I looked in the Discussion section for some help. There I read someone's comment saying that it can be easily solved using BFS.
This term was new for me, so I studied what BFS and DFS actually is. I'll try to solve this question tomorrow.

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More