Skip to content

Latest commit

 

History

History
85 lines (58 loc) · 5.47 KB

intro-to-data-structures.md

File metadata and controls

85 lines (58 loc) · 5.47 KB

Data Structures

Projected Time

75 - 90 min

  • 20 minutes - Slideshow
  • 40 minutes - Independent Practice
  • 15 minutes - Check for Understanding

Prerequisites

Motivation

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:

Objectives

Participants 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

Materials

Lesson

Data Structures & Algorithms Slideshow

Independent Practice

  1. Using the links available in the Common Mistakes section, create a diagram outlining the key functional differences between type and structure.
  2. Watch Crash Course Computer Science #14 video featured in Materials section above.
  3. 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.
  4. Practice questions on every data structure using link available in the Materials section

Common Mistakes / Misconceptions:

Data structures and data types are not the same.

Check for Understanding

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.

Additional Resources