data-structures-and-algorithms

This repository is going to be for problem solving tasks provided by ASAC team - Java Advanced course

View project on GitHub

Depth First Traversal

Depth First Traversal is an algorithm that travers over graphs and give the priority for the depth.

Challenge

This challenge asks to implement Depth First function to traverse over a graph and return the vertices in order.

Approach & Efficiency

Time complexity for DepthFirst algorithm is O(V+E) where V is the number of nodes in the graph, and E is the number of edges. Space complexity is O(V) where V is the maximum size of the stack at any point of time.

Solution

whiteboard