There are two main ways to traverse a tree data structure: Breadth First and Depth First. With Breadth First, we go through each row from left to right, and then go to the following row. With Depth First, we esentially go from top to bottom through all the nodes on the left side, and then the right. Here’s a diagram to better illustrate the order the nodes are visited:
In general, an Array is a type of data structure representing a block of data allocated in consecutive memory by index. For example, [8, 7, 9, 8, 9]
. A set is an abstract data type which contains only distinct elements or objects wihout the need of being allocated in order by index. For example, {8, 7, 9}
.
A queue can be conceptualized as a container where records enter one end end and exit on the other. A queue is very much like waiting in line to buy tickets, except there is no skipping or cutting in the line. The order in which records are added to a queue dictates the order in which records can come out. Adding a record to a queue is called enqueuing and removing a record is called dequeuing.
As I work on developing my band’s website, www.thegraspingstraws.com one thing I started noticing once I pushed a first draft to heroku was that my React Dev Tools icon was giving me an error. I was using the development build of React instead of the production build. This inspired me to learn more about the differences between the development and production build, and to figure out how to ready my app for production.
A linked list is a data structure that represents a sequence of nodes where each node points to the next. Linked lists can be singly linked or doubly linked. A doubly linked list gives each node pointers both to the next node and to the previous node in the sequence.