Author: Muthukrishnan

Date: April 24, 2020

Depth–first search (DFS) is an algorithm for traversing or searching tree or graph data structures. The algorithm starts at the root node (selecting some arbitrary node as the root node in the case of a graph) and explores as far as possible along each branch before backtracking. Python Implementation

Author: Muthukrishnan

Date: April 24, 2020

Runs in O(sqrt(N)) Time complexity

Author: Muthukrishnan

Date: April 24, 2020

BFS is a traversing algorithm where you should start traversing from a selected node (source or starting node) and traverse the graph by exploring all the neighbour nodes (nodes which are directly connected to source node). You must then move towards the next-level neighbour nodes. Basically traversing the tree or graph layer by layer. Pseudocode […]

Author: Muthukrishnan

Date: April 24, 2020

The main algorithm in the above program is the is_prime method. We should be able to check if a number is prime or not in the fastest way possible.