75 - 90 min
- 20 minutes - Slideshow
- 40 minutes - Independent Practice
- 15 minutes - Check for Understanding
- JavaScript 1 - Variables, Strings, & Integers
- JavaScript 2 - Arrays & Functions
- JavaScript 3 - Booleans, Conditionals, If/Else Statements
- JavaScript 4 - Loops
- JavaScript 5 - Functions
- JavaScript 6 - Object Literals
- JavaScript 7 - Object-Oriented Programming
- Runtime Complexity
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:
- Consider data structure availability when problem solving
- Contrast data structures with data types
- Identify main types of data structures, along with their pros and cons
- Classic use cases for each data structure
- Overview of common data structures
- Article: https://www.tutorialspoint.com/data_structures_algorithms/data_structures_basics.htm
- Data Structures: Crash Course Computer Science #14
Data Structures & Algorithms Slideshow
- Using the links available in the Common Mistakes section, create a diagram outlining the key functional differences between type and structure.
- Watch Crash Course Computer Science #14 video featured in Materials section above.
- Look through the Tutorials Point lessons from Data Structures through the Sorting Techniques section to gain more insight on Data Structures and their use cases.
- Practice questions on every data structure using link available in the Materials section
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.