Explore sets and maps are in an illustrative application that explores their structure and manipulation.
- [Narrator] Let's solve a basic problem.…Supposed we want to keep track of landmark pins on a map,…as the content, a name will do.…A string.…Coordinates are expressed as latitude…and longitude pairs.…And these are the coordinates used in GPS.…We'll use a pair of integers for this.…And we will use positive integers.…So for example,…if we have a coordinate of 34 degrees, 24 minutes, North,…and 90 degrees West,…then that would translate to 34…and 270.…
Don't worry about this conversion.…For now, let's just think of this pair,…as a pair of integers, positive integers.…Here are some important details about this problem:…First, we expect to have as many pins as needed,…but they will all be typed in by a human.…By this I mean, that we may have many pins but not infinite;…Not even thousands.…Next, there are infinite coordinates.…
That means that it's more appropriate…to represent them with floating point numbers…rather than integers.…A two-dimensional vector indexed by these coordinates…is definitely not an option.…Here are the reasons why:…
- Why the STL is important
- Containers and iterators
- Vectors and lists
- Stacks and dequeues
- Associative containers
Skill Level Advanced
1. The Standard Template Library
2. Vectors and Lists
3. Stacks, Queues, and Deques
4. Associative Containers
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.