Depth-first search (DFS) example / C++, Arduino, ESP32, ESP8266, STM, AVR

12
1
0
22.01.2023
ForCode

ForCode

1497
21
30
20.01.2023
PL
Описание видео:

#search #iot #C #esp32 #sorts #bigo #shots #dfs Depth-first search (DFS) is a search algorithm that explores as far as possible along each branch before backtracking. The basic idea behind DFS is to start at a given vertex (or node) and explore as deep as possible along each branch before backtracking. The algorithm uses a stack to keep track of the vertices to be visited and a visited array to keep track of the vertices that have already been visited. The basic structure of the DFS algorithm is as follows. Here, the DFS() function takes a starting vertex v, an adjacency list adj, and a visited array visited as its input. The function marks the current vertex as visited, prints it, and then recursively calls itself for each adjacent vertex that has not been visited yet. DFS has a time complexity of O(V plus E) where V is the number of vertices, and E is the number of edges in the graph. In the worst case, DFS may take O(V degree 2) time if the graph is represented as an adjacency matrix. DFS is useful for traversing a graph, finding a path between two nodes, solving puzzles like mazes, and other problems that require exhaustive search of a tree or graph. It can be used to solve various problems such as finding the number of connected components in a graph, finding the strongly connected components in a directed graph, solving puzzles like mazes, testing the existence of a cycle in a graph, and solving problems that require exhaustive search of a tree or graph. It's important to mention that DFS can be implemented in both recursive and non-recursive ways, the former is more simple to understand but it may cause stack overflow if the depth is too deep while the later can handle large depth but it may be more complex to understand.

Кадры из видео
Depth-first search (DFS) example / C++, Arduino, ESP32, ESP8266, STM, AVR
Depth-first search (DFS) example / C++, Arduino, ESP32, ESP8266, STM, AVR
Depth-first search (DFS) example / C++, Arduino, ESP32, ESP8266, STM, AVR
Depth-first search (DFS) example / C++, Arduino, ESP32, ESP8266, STM, AVR
Тэги из видео
Комментарии пользователей:
Что ищут прямо сейчас
screen Logic Pro Help america’s vodafone apn аркан треки spark ar Power Query импорт Word xiaomi mi box s Jonny Lieberman q mobile ime repair как установить maven ov yangi jangari kino гнар гайд домофоны брянск Sims 3 ldplayer free fire realme c3 unlock frp alucina vecina poraadnik AJ plus
Похожие видео
19.02.2017
Tutorial Tela Touch Itead Nextion com Arduino

Tutorial Tela Touch Itead Nextion com Arduino

26.03.2017
A* Search

A* Search

18.12.2017
TOP 10 Arduino Projects Of All Time | 2022

TOP 10 Arduino Projects Of All Time | 2022

24.02.2018
5.1 Graph Traversals - BFS & DFS -Breadth First Search and Depth First Search

5.1 Graph Traversals - BFS & DFS -Breadth First Search and Depth First Search

02.10.2016
Home automation over WiFi using WeMos ESP8266

Home automation over WiFi using WeMos ESP8266

18.01.2023
Remove duplicates from a Python List

Remove duplicates from a Python List

25.06.2016
OLEDiUNO Display PCB, please see my improved version too :-)

OLEDiUNO Display PCB, please see my improved version too :-)

04.08.2017
8x8x8 LED CUBE WITH ARDUINO UNO

8x8x8 LED CUBE WITH ARDUINO UNO

17.01.2017
microPython for ESP32

microPython for ESP32

15.02.2017
A* (A Star) Search Algorithm - Computerphile

A* (A Star) Search Algorithm - Computerphile

15.02.2013
Learn Atmel AVR Programming - An Introduction

Learn Atmel AVR Programming - An Introduction

05.10.2016
Arduino และ เซนเซอร์เบื้องต้น

Arduino และ เซนเซอร์เบื้องต้น

02.02.2019
How To Make A DIY Arduino Obstacle Avoiding Car At Home

How To Make A DIY Arduino Obstacle Avoiding Car At Home

14.09.2022
BFS & DFS | Breadth First Search | Depth First Search | Graph Traversing | DAA

BFS & DFS | Breadth First Search | Depth First Search | Graph Traversing | DAA

08.12.2017
Top 10 Arduino Projects 2018 | Amazing Ardiuno School Projects

Top 10 Arduino Projects 2018 | Amazing Ardiuno School Projects

19.02.2020
Troubleshooting Generator With No Power Output - AVR and Brush Replacement - Flashing the Field

Troubleshooting Generator With No Power Output - AVR and Brush Replacement - Flashing the Field

27.08.2015
ESP8266 #1 / Crie um WebServer sem Arduino

ESP8266 #1 / Crie um WebServer sem Arduino