YoVDO

Maps in C++ - std-map and std-unordered_map

Offered By: The Cherno via YouTube

Tags

C++ Courses Hash Functions Courses

Course Description

Overview

Explore the fundamentals and advanced usage of maps in C++, focusing on std::map and std::unordered_map. Learn about the purpose and benefits of maps, implement custom hash functions for user-defined types, and master key operations such as insertion, retrieval, and deletion. Discover how to iterate through maps, check for key existence, and create less-than operators for custom types. Gain insights into performance considerations and guidelines for choosing between different map types to optimize your C++ programs.

Syllabus

- What are maps?
- Why use maps + example usage
- Writing a hash function to use a custom type
- The [] operator
- The .at function
- How to check if key exists in map
- How to iterate through maps
- How to remove entries from maps
- Writing a less-than operator for custom types
- Performance and which map to use


Taught by

The Cherno

Related Courses

Classical Cryptosystems and Core Concepts
University of Colorado System via Coursera
Foundations of Cryptography
NPTEL via Swayam
Applied Cryptography
University of Colorado System via Coursera
Python 3: Deep Dive (Part 3 - Dictionaries, Sets, JSON)
Udemy
Cryptography and Digital Certificates
Coventry University via FutureLearn