Please enable JavaScript to use CodeHS

Data Structures in C++

Description

In this lesson, students learn how to create and use pairs and iterators. While these tools will not be used extensively here, both of them will be used later in the module as students explore sets and maps.

Objective

Students will be able to:

  • Explain how pairs and iterators are used and how they differ from other tools in C++
  • Create and use a pair in the proper setting
  • Iterate through a vector using an iterator
Description

In this lesson, students learn how to create and use sets. Sets are useful data structures and are different than other data structures students have seen since they are stored without an index value.

Objective

Students will be able to:

  • Explain how sets are different than other data structures they have encountered and where they can be used.
  • Create, insert, update, and access members of a set
  • Use an operator overload to use a struct with a set
Description

In this lesson, students learn how to create and use maps. Maps are very handy data structures that use a key instead of an index to access values.

Objective

Students will be able to:

  • Explain how maps are different than other data structures they have encountered and where they can be used.
  • Create, insert, update, and access members of a map
Description

In this lesson, students complete a summative assessment of the unit’s learning objectives.

Objective

Students will be able to:

  • Prove their knowledge of sets and maps through a multiple choice quiz