Discover how we can organize a collection of nodes in a tree structure with reference. Explore the basic terminology of a tree data structure and how to describe various nodes in the tree based on positioning.
- Before jumping into tree data structures,…recall linked lists.…With a linked list,…we had an ordered list of nodes…that we could traverse forward or backward.…Each node contains some data,…an integer, string or something else…and pointers to the next node and previous node…if this was a doubly linked list.…Like a linked list, a tree data structure contains nodes…but it's really a collection of nodes.…The main difference is that the nodes in the tree…might be linked to one, two or more nodes.…
While we could represent this visually…in all sorts of confusing ways,…the best visual representation…is a tree structure.…Now again, how these objects are physically allocated…in memory is unimportant.…This is a logical data structure we're talking about.…It's an idea,…just like a linked list,…there's always a specific starting node…in a tree data structure.…We call it the root node…and when drawing the structure on paper,…we usually draw it out like this.…
Now this root node can contain data…as well as links to other nodes.…
- Data types: Booleans, numbers, strings, and more
- Multidimensional arrays
- Jagged arrays
- Search and sort arrays
- Linked lists
- Stacks and queues
- Hash functions and hash tables
- Trees and graphs
Skill Level Intermediate
Understand data structures1m 25s
1. Introduction to Data Structures
4. Stacks and Queues
5. Hash-Based Data Structures
6. Trees and Graphs
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.