Загрузка страницы

Depth First Search (DFS) Algorithm in Hindi with Example

Depth First Search (DFS) algorithm traverses a graph in a depthward motion.

DFS algorithm uses Stack data structure.

DFS Algorithm:

Step 1 − Put the starting vertex into the stack.
Mark it as visited.
Display it.

Step 2 − if( STACK[top] has adjacent unvisited vertex )
{
Visit the adjacent unvisited vertex and Mark it as visited.
push it into the STACK.
Display it.
}
else
{
pop top element of stack.
}
(repeat rule 2 until stack is empty)

Видео Depth First Search (DFS) Algorithm in Hindi with Example канала Exam Aasaan Hai !!!
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
14 мая 2018 г. 10:14:30
00:17:41
Яндекс.Метрика