kinshuk-code-1729 / C-Plus-Plus-STL

This repository contains various codes which depict the C++ STL Functions which I've made while learning C++ Standard Library from unstop.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

C++ Standard Template Library

image

The Standard Template Library (STL) is a set of C++ template classes to provide common programming data structures and functions such as lists, stacks, arrays, etc. It is a library of container classes, algorithms, and iterators. It is a generalized library and so, its components are parameterized. Working knowledge of template classes is a prerequisite for working with STL.

STL has 4 components :

  • Algorithms
  • Containers
  • Functions
  • Iterators

Multisets

A multiset is an STL container that can contain multiple objects which have the same value which is stored in a well-defined manner. The multisets are almost similar to sets, except in sets only unique elements are allowed but in multisets, multiple elements with the same values are also allowed.

image

How to use multisets in C++ ??

  • The STL multisets can be used in the program by adding two header files.
  • The first is a set and the other is an iterator.

Unordered Maps

Unordered maps are the containers that contain key-value pairs in a randomised manner.Every key present in the unordered map is distinct though their key values can be the same. The unordered map is implemented internally using hashing.

image

How to use unordered maps in C++ ??

  • The STL unordered map can be used in the program by adding two header files.
  • The first is unordered_map and the other is an iterator.

About

This repository contains various codes which depict the C++ STL Functions which I've made while learning C++ Standard Library from unstop.com

License:GNU Affero General Public License v3.0


Languages

Language:C++ 100.0%