75 - 90 min
Structuring data, and deciding how to organize and store data in non-arbitrary ways is one way to create performant programs. When data is efficiently structured, then data manipulation can be optimized. With that in mind, it’s important to take note of the fact that no single data structure is a one-size fits all solution, therefore, it is necessary to know the strengths and limitations of several data structures. Data Structures can be grouped into two camps: Linear and Non-Linear.
Linear data structures arrange values in a linear form, and some commonly used linear data structures include Arrays: great for storing a list of a fixed length, Linked-list: great for storing a number of data items that can easily change size to add or remove items, Stacks: Add to top and remove from the top (last in, first out data traversal), Queues: Add to the back and remove from the front, (first in first out data storage/traversal), and Priority queues: add anywhere, and remove the highest priority (array that searches for the lowest cost contained and appends it to the end).
Non-linear data structures imply that data values are not arranged in order. Some structures include hash tables: unordered lists which use a hash function to insert and search (used to implement key, value, dictionary-like interfaces), Trees: data is organized in branches (data structure consisting of one or more data nodes, an XML document with a root node is a good example), Binary Trees (great for storing records that can be accessed in a key, value pair), Graphs: a general branching structure with less strict conditions than a tree. Some other data structures include record, union, tagged union, class, graphs, and binary trees.
Data Structure forms the major part of IT companies. Many top companies like Microsoft and Google hire on the basis of coding skills that mainly includes data structure.
Example of people getting hired having data structure knowledge:
Apprentices will be able to:
Data Structures & Algorithms Slideshow
Data structures and data types are not the same.
Using a timer, pair up for 5 minutes and quiz each other while reviewing the differences between data types and data structures. After that, switch partners and discuss the ways each featured data structure works for 10 minutes.