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)