SlideShare a Scribd company logo
Dev Concepts
What are Data
Structures and
Algorithms?
Brief
2
 Data structures are representations of data in the computer
memory, which allow efficient access and modification
 Linear data types: arrays, lists, stacks, queues
Data Structures
… … … … …
0 1 2 3 4
Array / list
(indexed group of elements)
Linked list
(sequence of linked elements)
Queue
 List of numbers, representing a sequence of income amounts:
 Adding a new income:
 Modifying an existing income:
List of Numbers – Example
var incomes = [
150, 200, 70.50, 120
];
Element Value
incomes[0] 150
incomes[1] 200
incomes[2] 70.50
incomes[3] 120
incomes.push(300);
incomes[4] 300
incomes[1] = 250;
250
3
Live Demo
List of Numbers
https://repl.it/@nakov/list-example-js
5
 Trees and tree-like data structures
 Each node holds data + list of
child nodes + parent node
Trees and Traversal Algorithms
C:
Programs Users Windows
Peter
Maria George
 Tree traversal algorithms
 Depth-First Search (DFS)
 Breadth-First Search (BFS)
DepthFirstSearch(node) {
print(node);
for each ch in node.childNodes
DepthFirstSearch(ch)
}
Live Demo
Recursive Traversal
of the File System
https://repl.it/@nakov/traverse-folders-cs
 …
 …
 …
Next Steps
 Join the SoftUni "Learn To Code" Community
 Access the Free Dev Lessons
 Get Help from the Mentors
 Meet the Other Learners
https://softuni.org
 …
 …
 …
Join the SoftUni Community
softuni.o
rg
Ad

Recommended

Java Foundations: Arrays
Java Foundations: Arrays
Svetlin Nakov
 
Java Foundations: Data Types and Type Conversion
Java Foundations: Data Types and Type Conversion
Svetlin Nakov
 
Java Foundations: Lists, ArrayList<T>
Java Foundations: Lists, ArrayList<T>
Svetlin Nakov
 
Java Foundations: Objects and Classes
Java Foundations: Objects and Classes
Svetlin Nakov
 
Arrays in java language
Arrays in java language
Hareem Naz
 
16. Arrays Lists Stacks Queues
16. Arrays Lists Stacks Queues
Intro C# Book
 
18. Dictionaries, Hash-Tables and Set
18. Dictionaries, Hash-Tables and Set
Intro C# Book
 
Java Foundations: Strings and Text Processing
Java Foundations: Strings and Text Processing
Svetlin Nakov
 
18. Java associative arrays
18. Java associative arrays
Intro C# Book
 
Introduction to python programming
Introduction to python programming
Rakotoarison Louis Frederick
 
13. Java text processing
13. Java text processing
Intro C# Book
 
Python Modules and Libraries
Python Modules and Libraries
Venugopalavarma Raja
 
Arrays in java
Arrays in java
bhavesh prakash
 
Scikit-learn Cheatsheet-Python
Scikit-learn Cheatsheet-Python
Dr. Volkan OBAN
 
Data Structure Midterm Lesson Arrays
Data Structure Midterm Lesson Arrays
Maulen Bale
 
One dimensional 2
One dimensional 2
Rajendran
 
Java arrays
Java arrays
Mohammed Sikander
 
Array Introduction One-dimensional array Multidimensional array
Array Introduction One-dimensional array Multidimensional array
imtiazalijoono
 
Arrays
Arrays
Chirag vasava
 
Array lecture
Array lecture
Joan Saño
 
1 D Arrays in C++
1 D Arrays in C++
poonam.rwalia
 
C# Arrays
C# Arrays
Hock Leng PUAH
 
Arrays C#
Arrays C#
Raghuveer Guthikonda
 
What is Binary (Computer Science)
What is Binary (Computer Science)
Mansoor Bahramand
 
Whiteboarding Coding Challenges in Python
Whiteboarding Coding Challenges in Python
Andrew Ferlitsch
 
Chap09
Chap09
Terry Yoast
 
Arrays In Python | Python Array Operations | Edureka
Arrays In Python | Python Array Operations | Edureka
Edureka!
 
array
array
Yaswanth Babu Gummadivelli
 
BASIC OF DATABASE PPT new.pptx
BASIC OF DATABASE PPT new.pptx
NiyatiMandaliya
 
Python for beginners
Python for beginners
Ali Huseyn Aliyev
 

More Related Content

What's hot (20)

18. Java associative arrays
18. Java associative arrays
Intro C# Book
 
Introduction to python programming
Introduction to python programming
Rakotoarison Louis Frederick
 
13. Java text processing
13. Java text processing
Intro C# Book
 
Python Modules and Libraries
Python Modules and Libraries
Venugopalavarma Raja
 
Arrays in java
Arrays in java
bhavesh prakash
 
Scikit-learn Cheatsheet-Python
Scikit-learn Cheatsheet-Python
Dr. Volkan OBAN
 
Data Structure Midterm Lesson Arrays
Data Structure Midterm Lesson Arrays
Maulen Bale
 
One dimensional 2
One dimensional 2
Rajendran
 
Java arrays
Java arrays
Mohammed Sikander
 
Array Introduction One-dimensional array Multidimensional array
Array Introduction One-dimensional array Multidimensional array
imtiazalijoono
 
Arrays
Arrays
Chirag vasava
 
Array lecture
Array lecture
Joan Saño
 
1 D Arrays in C++
1 D Arrays in C++
poonam.rwalia
 
C# Arrays
C# Arrays
Hock Leng PUAH
 
Arrays C#
Arrays C#
Raghuveer Guthikonda
 
What is Binary (Computer Science)
What is Binary (Computer Science)
Mansoor Bahramand
 
Whiteboarding Coding Challenges in Python
Whiteboarding Coding Challenges in Python
Andrew Ferlitsch
 
Chap09
Chap09
Terry Yoast
 
Arrays In Python | Python Array Operations | Edureka
Arrays In Python | Python Array Operations | Edureka
Edureka!
 
array
array
Yaswanth Babu Gummadivelli
 

Similar to Dev Concepts: Data Structures and Algorithms (20)

BASIC OF DATABASE PPT new.pptx
BASIC OF DATABASE PPT new.pptx
NiyatiMandaliya
 
Python for beginners
Python for beginners
Ali Huseyn Aliyev
 
Chapter 6 (information system) answer
Chapter 6 (information system) answer
smkengkilili2011
 
DataCamp Cheat Sheets 4 Python Users (2020)
DataCamp Cheat Sheets 4 Python Users (2020)
EMRE AKCAOGLU
 
Preparing for BIT – IT2301 Database Management Systems 2001d
Preparing for BIT – IT2301 Database Management Systems 2001d
Gihan Wikramanayake
 
Database Basics
Database Basics
Abdel Moneim Emad
 
My sql1
My sql1
Akash Gupta
 
MSBI and Data WareHouse techniques by Quontra
MSBI and Data WareHouse techniques by Quontra
QUONTRASOLUTIONS
 
Sql
Sql
YUCHENG HU
 
Bank mangement system
Bank mangement system
FaisalGhffar
 
R ppt for skejsjsjsjjssjskskskskskksk.pptx
R ppt for skejsjsjsjjssjskskskskskksk.pptx
vivek989689
 
Power point presentation on loading and handling data in R
Power point presentation on loading and handling data in R
sharmahemant3612
 
Introduction to the Structured Query Language SQL
Introduction to the Structured Query Language SQL
Harmony Kwawu
 
Data structure using c++
Data structure using c++
Prof. Dr. K. Adisesha
 
BIS06 Physical Database Models
BIS06 Physical Database Models
Prithwis Mukerjee
 
BIS06 Physical Database Models
BIS06 Physical Database Models
Prithwis Mukerjee
 
online blood bank system design
online blood bank system design
Rohit Jawale
 
Introduction to Database Concepts
Introduction to Database Concepts
Rosalyn Lemieux
 
E-R diagram & SQL
E-R diagram & SQL
Abdullah Almasud
 
Data structures "1" (Lectures 2015-2016)
Data structures "1" (Lectures 2015-2016)
Ameer B. Alaasam
 
BASIC OF DATABASE PPT new.pptx
BASIC OF DATABASE PPT new.pptx
NiyatiMandaliya
 
Chapter 6 (information system) answer
Chapter 6 (information system) answer
smkengkilili2011
 
DataCamp Cheat Sheets 4 Python Users (2020)
DataCamp Cheat Sheets 4 Python Users (2020)
EMRE AKCAOGLU
 
Preparing for BIT – IT2301 Database Management Systems 2001d
Preparing for BIT – IT2301 Database Management Systems 2001d
Gihan Wikramanayake
 
MSBI and Data WareHouse techniques by Quontra
MSBI and Data WareHouse techniques by Quontra
QUONTRASOLUTIONS
 
Bank mangement system
Bank mangement system
FaisalGhffar
 
R ppt for skejsjsjsjjssjskskskskskksk.pptx
R ppt for skejsjsjsjjssjskskskskskksk.pptx
vivek989689
 
Power point presentation on loading and handling data in R
Power point presentation on loading and handling data in R
sharmahemant3612
 
Introduction to the Structured Query Language SQL
Introduction to the Structured Query Language SQL
Harmony Kwawu
 
BIS06 Physical Database Models
BIS06 Physical Database Models
Prithwis Mukerjee
 
BIS06 Physical Database Models
BIS06 Physical Database Models
Prithwis Mukerjee
 
online blood bank system design
online blood bank system design
Rohit Jawale
 
Introduction to Database Concepts
Introduction to Database Concepts
Rosalyn Lemieux
 
Data structures "1" (Lectures 2015-2016)
Data structures "1" (Lectures 2015-2016)
Ameer B. Alaasam
 
Ad

More from Svetlin Nakov (20)

AI and the Future of Devs: Nakov @ Techniverse (Nov 2024)
AI and the Future of Devs: Nakov @ Techniverse (Nov 2024)
Svetlin Nakov
 
AI за ежедневието - Наков @ Techniverse (Nov 2024)
AI за ежедневието - Наков @ Techniverse (Nov 2024)
Svetlin Nakov
 
AI инструменти за бизнеса - Наков - Nov 2024
AI инструменти за бизнеса - Наков - Nov 2024
Svetlin Nakov
 
AI Adoption in Business - Nakov at Forbes HR Forum - Sept 2024
AI Adoption in Business - Nakov at Forbes HR Forum - Sept 2024
Svetlin Nakov
 
Software Engineers in the AI Era - Sept 2024
Software Engineers in the AI Era - Sept 2024
Svetlin Nakov
 
Най-търсените направления в ИТ сферата за 2024
Най-търсените направления в ИТ сферата за 2024
Svetlin Nakov
 
BG-IT-Edu: отворено учебно съдържание за ИТ учители
BG-IT-Edu: отворено учебно съдържание за ИТ учители
Svetlin Nakov
 
Programming World in 2024
Programming World in 2024
Svetlin Nakov
 
AI Tools for Business and Startups
AI Tools for Business and Startups
Svetlin Nakov
 
AI Tools for Scientists - Nakov (Oct 2023)
AI Tools for Scientists - Nakov (Oct 2023)
Svetlin Nakov
 
AI Tools for Entrepreneurs
AI Tools for Entrepreneurs
Svetlin Nakov
 
Bulgarian Tech Industry - Nakov at Dev.BG All in One Conference 2023
Bulgarian Tech Industry - Nakov at Dev.BG All in One Conference 2023
Svetlin Nakov
 
AI Tools for Business and Personal Life
AI Tools for Business and Personal Life
Svetlin Nakov
 
Дипломна работа: учебно съдържание по ООП - Светлин Наков
Дипломна работа: учебно съдържание по ООП - Светлин Наков
Svetlin Nakov
 
Дипломна работа: учебно съдържание по ООП
Дипломна работа: учебно съдържание по ООП
Svetlin Nakov
 
Свободно ИТ учебно съдържание за учители по програмиране и ИТ
Свободно ИТ учебно съдържание за учители по програмиране и ИТ
Svetlin Nakov
 
AI and the Professions of the Future
AI and the Professions of the Future
Svetlin Nakov
 
Programming Languages Trends for 2023
Programming Languages Trends for 2023
Svetlin Nakov
 
IT Professions and How to Become a Developer
IT Professions and How to Become a Developer
Svetlin Nakov
 
GitHub Actions (Nakov at RuseConf, Sept 2022)
GitHub Actions (Nakov at RuseConf, Sept 2022)
Svetlin Nakov
 
AI and the Future of Devs: Nakov @ Techniverse (Nov 2024)
AI and the Future of Devs: Nakov @ Techniverse (Nov 2024)
Svetlin Nakov
 
AI за ежедневието - Наков @ Techniverse (Nov 2024)
AI за ежедневието - Наков @ Techniverse (Nov 2024)
Svetlin Nakov
 
AI инструменти за бизнеса - Наков - Nov 2024
AI инструменти за бизнеса - Наков - Nov 2024
Svetlin Nakov
 
AI Adoption in Business - Nakov at Forbes HR Forum - Sept 2024
AI Adoption in Business - Nakov at Forbes HR Forum - Sept 2024
Svetlin Nakov
 
Software Engineers in the AI Era - Sept 2024
Software Engineers in the AI Era - Sept 2024
Svetlin Nakov
 
Най-търсените направления в ИТ сферата за 2024
Най-търсените направления в ИТ сферата за 2024
Svetlin Nakov
 
BG-IT-Edu: отворено учебно съдържание за ИТ учители
BG-IT-Edu: отворено учебно съдържание за ИТ учители
Svetlin Nakov
 
Programming World in 2024
Programming World in 2024
Svetlin Nakov
 
AI Tools for Business and Startups
AI Tools for Business and Startups
Svetlin Nakov
 
AI Tools for Scientists - Nakov (Oct 2023)
AI Tools for Scientists - Nakov (Oct 2023)
Svetlin Nakov
 
AI Tools for Entrepreneurs
AI Tools for Entrepreneurs
Svetlin Nakov
 
Bulgarian Tech Industry - Nakov at Dev.BG All in One Conference 2023
Bulgarian Tech Industry - Nakov at Dev.BG All in One Conference 2023
Svetlin Nakov
 
AI Tools for Business and Personal Life
AI Tools for Business and Personal Life
Svetlin Nakov
 
Дипломна работа: учебно съдържание по ООП - Светлин Наков
Дипломна работа: учебно съдържание по ООП - Светлин Наков
Svetlin Nakov
 
Дипломна работа: учебно съдържание по ООП
Дипломна работа: учебно съдържание по ООП
Svetlin Nakov
 
Свободно ИТ учебно съдържание за учители по програмиране и ИТ
Свободно ИТ учебно съдържание за учители по програмиране и ИТ
Svetlin Nakov
 
AI and the Professions of the Future
AI and the Professions of the Future
Svetlin Nakov
 
Programming Languages Trends for 2023
Programming Languages Trends for 2023
Svetlin Nakov
 
IT Professions and How to Become a Developer
IT Professions and How to Become a Developer
Svetlin Nakov
 
GitHub Actions (Nakov at RuseConf, Sept 2022)
GitHub Actions (Nakov at RuseConf, Sept 2022)
Svetlin Nakov
 
Ad

Recently uploaded (20)

A Guide to Telemedicine Software Development.pdf
A Guide to Telemedicine Software Development.pdf
Olivero Bozzelli
 
Sysinfo OST to PST Converter Infographic
Sysinfo OST to PST Converter Infographic
SysInfo Tools
 
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
arabelatso
 
ERP Systems in the UAE: Driving Business Transformation with Smart Solutions
ERP Systems in the UAE: Driving Business Transformation with Smart Solutions
dheeodoo
 
HYBRIDIZATION OF ALKANES AND ALKENES ...
HYBRIDIZATION OF ALKANES AND ALKENES ...
karishmaduhijod1
 
Automated Testing and Safety Analysis of Deep Neural Networks
Automated Testing and Safety Analysis of Deep Neural Networks
Lionel Briand
 
From Code to Commerce, a Backend Java Developer's Galactic Journey into Ecomm...
From Code to Commerce, a Backend Java Developer's Galactic Journey into Ecomm...
Jamie Coleman
 
Simplify Task, Team, and Project Management with Orangescrum Work
Simplify Task, Team, and Project Management with Orangescrum Work
Orangescrum
 
Humans vs AI Call Agents - Qcall.ai's Special Report
Humans vs AI Call Agents - Qcall.ai's Special Report
Udit Goenka
 
Why Edge Computing Matters in Mobile Application Tech.pdf
Why Edge Computing Matters in Mobile Application Tech.pdf
IMG Global Infotech
 
Advance Doctor Appointment Booking App With Online Payment
Advance Doctor Appointment Booking App With Online Payment
AxisTechnolabs
 
Streamlining CI/CD with FME Flow: A Practical Guide
Streamlining CI/CD with FME Flow: A Practical Guide
Safe Software
 
Best Practice for LLM Serving in the Cloud
Best Practice for LLM Serving in the Cloud
Alluxio, Inc.
 
Why Every Growing Business Needs a Staff Augmentation Company IN USA.pdf
Why Every Growing Business Needs a Staff Augmentation Company IN USA.pdf
mary rojas
 
Folding Cheat Sheet # 9 - List Unfolding 𝑢𝑛𝑓𝑜𝑙𝑑 as the Computational Dual of ...
Folding Cheat Sheet # 9 - List Unfolding 𝑢𝑛𝑓𝑜𝑙𝑑 as the Computational Dual of ...
Philip Schwarz
 
From Data Preparation to Inference: How Alluxio Speeds Up AI
From Data Preparation to Inference: How Alluxio Speeds Up AI
Alluxio, Inc.
 
AI for PV: Development and Governance for a Regulated Industry
AI for PV: Development and Governance for a Regulated Industry
Biologit
 
OpenChain Webinar - AboutCode - Practical Compliance in One Stack – Licensing...
OpenChain Webinar - AboutCode - Practical Compliance in One Stack – Licensing...
Shane Coughlan
 
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
arabelatso
 
On-Device AI: Is It Time to Go All-In, or Do We Still Need the Cloud?
On-Device AI: Is It Time to Go All-In, or Do We Still Need the Cloud?
Hassan Abid
 
A Guide to Telemedicine Software Development.pdf
A Guide to Telemedicine Software Development.pdf
Olivero Bozzelli
 
Sysinfo OST to PST Converter Infographic
Sysinfo OST to PST Converter Infographic
SysInfo Tools
 
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
arabelatso
 
ERP Systems in the UAE: Driving Business Transformation with Smart Solutions
ERP Systems in the UAE: Driving Business Transformation with Smart Solutions
dheeodoo
 
HYBRIDIZATION OF ALKANES AND ALKENES ...
HYBRIDIZATION OF ALKANES AND ALKENES ...
karishmaduhijod1
 
Automated Testing and Safety Analysis of Deep Neural Networks
Automated Testing and Safety Analysis of Deep Neural Networks
Lionel Briand
 
From Code to Commerce, a Backend Java Developer's Galactic Journey into Ecomm...
From Code to Commerce, a Backend Java Developer's Galactic Journey into Ecomm...
Jamie Coleman
 
Simplify Task, Team, and Project Management with Orangescrum Work
Simplify Task, Team, and Project Management with Orangescrum Work
Orangescrum
 
Humans vs AI Call Agents - Qcall.ai's Special Report
Humans vs AI Call Agents - Qcall.ai's Special Report
Udit Goenka
 
Why Edge Computing Matters in Mobile Application Tech.pdf
Why Edge Computing Matters in Mobile Application Tech.pdf
IMG Global Infotech
 
Advance Doctor Appointment Booking App With Online Payment
Advance Doctor Appointment Booking App With Online Payment
AxisTechnolabs
 
Streamlining CI/CD with FME Flow: A Practical Guide
Streamlining CI/CD with FME Flow: A Practical Guide
Safe Software
 
Best Practice for LLM Serving in the Cloud
Best Practice for LLM Serving in the Cloud
Alluxio, Inc.
 
Why Every Growing Business Needs a Staff Augmentation Company IN USA.pdf
Why Every Growing Business Needs a Staff Augmentation Company IN USA.pdf
mary rojas
 
Folding Cheat Sheet # 9 - List Unfolding 𝑢𝑛𝑓𝑜𝑙𝑑 as the Computational Dual of ...
Folding Cheat Sheet # 9 - List Unfolding 𝑢𝑛𝑓𝑜𝑙𝑑 as the Computational Dual of ...
Philip Schwarz
 
From Data Preparation to Inference: How Alluxio Speeds Up AI
From Data Preparation to Inference: How Alluxio Speeds Up AI
Alluxio, Inc.
 
AI for PV: Development and Governance for a Regulated Industry
AI for PV: Development and Governance for a Regulated Industry
Biologit
 
OpenChain Webinar - AboutCode - Practical Compliance in One Stack – Licensing...
OpenChain Webinar - AboutCode - Practical Compliance in One Stack – Licensing...
Shane Coughlan
 
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
arabelatso
 
On-Device AI: Is It Time to Go All-In, or Do We Still Need the Cloud?
On-Device AI: Is It Time to Go All-In, or Do We Still Need the Cloud?
Hassan Abid
 

Dev Concepts: Data Structures and Algorithms

  • 1. Dev Concepts What are Data Structures and Algorithms? Brief
  • 2. 2  Data structures are representations of data in the computer memory, which allow efficient access and modification  Linear data types: arrays, lists, stacks, queues Data Structures … … … … … 0 1 2 3 4 Array / list (indexed group of elements) Linked list (sequence of linked elements) Queue
  • 3.  List of numbers, representing a sequence of income amounts:  Adding a new income:  Modifying an existing income: List of Numbers – Example var incomes = [ 150, 200, 70.50, 120 ]; Element Value incomes[0] 150 incomes[1] 200 incomes[2] 70.50 incomes[3] 120 incomes.push(300); incomes[4] 300 incomes[1] = 250; 250 3
  • 4. Live Demo List of Numbers https://repl.it/@nakov/list-example-js
  • 5. 5  Trees and tree-like data structures  Each node holds data + list of child nodes + parent node Trees and Traversal Algorithms C: Programs Users Windows Peter Maria George  Tree traversal algorithms  Depth-First Search (DFS)  Breadth-First Search (BFS) DepthFirstSearch(node) { print(node); for each ch in node.childNodes DepthFirstSearch(ch) }
  • 6. Live Demo Recursive Traversal of the File System https://repl.it/@nakov/traverse-folders-cs
  • 7.  …  …  … Next Steps  Join the SoftUni "Learn To Code" Community  Access the Free Dev Lessons  Get Help from the Mentors  Meet the Other Learners https://softuni.org
  • 8.  …  …  … Join the SoftUni Community softuni.o rg

Editor's Notes

  • #2: Hello, I am Svetlin Nakov from SoftUni and this is the next episode from my "Dev Concepts" series. In this lesson I will briefly explain and demonstrate the concepts of data structures and algorithms in computer programming, with live code examples. As an example, I will demonstrate the "tree" data structure and the DFS algorithm (the recursive depth-first search traversal).
  • #3: Data structures are representations of data in the computer memory, which allow efficient access and modification. This is a pretty big topic. Hundreds of books are written about data structures. Data structures can be linear structures (such as arrays and lists), tree-like structures (such as balanced trees), graph-like structures (such as graphs), hash-based structures (such as hash-tables) and others. Linear data types are the most commonly used data structures in programming. They represent sequences of elements, which can be ordered or not, indexed or not, linked to the next element or not, etc. Examples of linear data structures are arrays, lists, stacks and queues. This is how arrays and array-based lists look like in most programming languages and platforms: They are sequences of elements, which are directly accessible by their position (which is called "index"). This is an example of linked-list. It consists of elements, where each element knows its next element. The last element has "null" (or missing value) as next element. Unlike array-based lists, linked list do not provide direct access by index. This is an example of array-based queue. The "queue" data structure works on the FIFO principle (first-in first-out). Elements are appended in the queue at its left end (at its back). This operation is called "enqueue". Elements are taken from the queue from its right end (from its front). This operation is called "dequeue". We shall master the linear data structures in detail in the advanced programming modules at SoftUni.
  • #4: This is a simple example, which illustrates the "list" data structure. We have a list of numbers, representing a sequence of income amounts. This is how the list looks like in the memory. It is an indexed structure: each element has a unique index, a number in the range from 0 to the size of the list minus one. This is how we can append a new income. This is how we can modify an existing income, by its index.
  • #5: This live demonstration illustrates how to use simple lists in JavaScript. We open the live example at repl.it. And we wait for it to load. It needs some time. This is the same example from the previous slide. We run it and we see the result: the list before and after the modifications.
  • #6: In programming, sometimes we use more complex data structures, like trees. Tees and tree-like data structures consist of nodes, where each node holds data + list of child nodes + parent node This example illustrates visually a tree. This is a tree holding, the directory structure of a hard drive in Windows. The root node "C colon backslash" has 3 child nodes: "Programs", "Users" and "Windows" The child node "Users" has 3 child nodes: "Maria", "Peter" and "George". The other nodes have no children. Each node, except the root, have a parent node. Data structures often come with algorithms for their processing. Such algorithms can be different styles of traversing; appending, inserting, deleting and modifying a node; extracting sub-structures, finding paths, and much more. Examples of algorithms are the classical tree traversal algorithms: Depth-First Search (DFS) And Breadth-First Search (BFS) We shall learn them in the "Data Structures and Algorithms" module at SoftUni. This is a sample pseudocode implementation of the Depth-First-Search algorithm. The in-depth traversal starts from certain node. Then this node is first printed. Then the traversal starts recursively from each child node of the current node. The traversal process initially starts from the root node of the tree and reaches all tree nodes sooner or later. Unless the tree has a cycle or the tree is not connected, this process in finite and will traverse all the nodes.
  • #7: This live example illustrates the tree traversal algorithm "Depth-First-Search" (DFS), used to traverse the local file system. Let' see it in action. We open the live code example at repl.it. Now we wait for it to load, as usually. We can see the source code of the example. Тhe code is a little bit longer and a little more complicated than in the previous example, but essentially this is the DFS algorithm implemented in C#. This sample code starts the directory tree traversal from the parent of the current folder and traverses recursively the file system under this folder. Let's run the program. The output holds all the files and subfolders of the current folder at the server-side, listed recursively. In this lesson I cannot teach you how to traverse trees. Instead I can demonstrate important development concepts, such as data structures and algorithms. This is just a small example of how an algorithm may look like. I hope you find it interesting to learn more about data structures and algorithms later in your learning track for programmers.
  • #8: Did you like this lesson? Do you want more? Join the learners' community at softuni.org. Subscribe to my YouTube channel to get more free video tutorials on coding, dev concepts and software development. Access more free dev lessons and learning resources for developers. Get free help from mentors and meet other learners. And it's all free!
  • #9: Join now! SOFTUNI.ORG