SlideShare une entreprise Scribd logo
1  sur  19
PERSTATION ON (STL)   Standard Template Library BY HEMANT JAIN ROLL NO. 22
Standard Template Library ,[object Object],[object Object],[object Object]
[object Object],[object Object]
STL (Standard Template Library) Algorithms Container Classes A library of class and function templates based on work in generic programming done by Alex Stepanov and Meng Lee of the Hewlett Packard Laboratories in the early 1990s.  vector sort() begin() end() Iterates
Standard Template Library ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
                                                
(1). Containers ,[object Object],[object Object],[object Object],[object Object]
STL's Containers  In 1994, STL was adopted as a standard part of C++. There are some containers in STL: Kind of Container STL Containers Sequential: deque ,  list ,  vector Associative: map ,  multimap ,  multiset ,  set Adapters: priority_queue ,  queue ,  stack Non-STL: bitset ,  valarray ,  string
Containers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Sequence Containers Ex. vector<int> v1; vector<int>iterator iter; Random Quick random access, slow insertion/deletion in middle, size can not be changed at runtime array Iterator Description Container Random Double ended queue, direct access, slow insert/delete in middle, fast at beg/ end deque  Bidir. Doubly link list, fast insert/delete anywhere, slow random access list Random Dynamic array, quick random access, slow insertion/deletion in middle, fast at back vector
Associative Containers Ex. set<int> s1; Bidir. Stores key-value pair, Unique keys, one-to-one mapping Map Iterator Description Container Bidir. Stores key-value pair, Multiple keys, one-to-many mapping Multimap Bidir. Stores non-unique key objects Multiset Bidir. Stores unique key objects, allows rapid look up Set
Derived Containers/Container Adapters Ex.  stack <deque<int> > s1; Iterator Description Container None Element of highest priority popped. Create from vector or dequeue Priority -queue None FIFO. Create from list or dequeue Queue None LIFO. Create from vector, list or dequeue Stack
(2). Iterators ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Iterators
Algorithms ,[object Object]
Algorithms ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
STL SEQUENCE CONTAINERS CONTAINER ADAPTORS ASSOCIATIVE CONTAINER OTHER CONTAINERS VECTOR LIST DEQUE  QUEUE PRIORITY_ QUEUE STACK SET HASH_SET MULIT_SET HASH_MULTISE T MAP HASH_MAP MULITMAP HASH_MULITMAP BITSET VALARRAY
THANK YOU....

Contenu connexe

Tendances (20)

C++ Standard Template Library
C++ Standard Template LibraryC++ Standard Template Library
C++ Standard Template Library
 
Pointers in c++ by minal
Pointers in c++ by minalPointers in c++ by minal
Pointers in c++ by minal
 
Python programming : Arrays
Python programming : ArraysPython programming : Arrays
Python programming : Arrays
 
Ppt on Linked list,stack,queue
Ppt on Linked list,stack,queuePpt on Linked list,stack,queue
Ppt on Linked list,stack,queue
 
Introduction to stack
Introduction to stackIntroduction to stack
Introduction to stack
 
Queues
QueuesQueues
Queues
 
Data Structures (CS8391)
Data Structures (CS8391)Data Structures (CS8391)
Data Structures (CS8391)
 
Stack and Queue
Stack and Queue Stack and Queue
Stack and Queue
 
Data Structures - Lecture 7 [Linked List]
Data Structures - Lecture 7 [Linked List]Data Structures - Lecture 7 [Linked List]
Data Structures - Lecture 7 [Linked List]
 
Vector class in C++
Vector class in C++Vector class in C++
Vector class in C++
 
Queue
QueueQueue
Queue
 
Stack
StackStack
Stack
 
Data Structure
Data Structure Data Structure
Data Structure
 
SPL 10 | One Dimensional Array in C
SPL 10 | One Dimensional Array in CSPL 10 | One Dimensional Array in C
SPL 10 | One Dimensional Array in C
 
Stack and Queue by M.Gomathi Lecturer
Stack and Queue by M.Gomathi LecturerStack and Queue by M.Gomathi Lecturer
Stack and Queue by M.Gomathi Lecturer
 
Wrapper class
Wrapper classWrapper class
Wrapper class
 
Queue
QueueQueue
Queue
 
stack presentation
stack presentationstack presentation
stack presentation
 
DATA STRUCTURE AND ALGORITHMS
DATA STRUCTURE AND ALGORITHMS DATA STRUCTURE AND ALGORITHMS
DATA STRUCTURE AND ALGORITHMS
 
Sorting Algorithm
Sorting AlgorithmSorting Algorithm
Sorting Algorithm
 

En vedette

Lecture11 standard template-library
Lecture11 standard template-libraryLecture11 standard template-library
Lecture11 standard template-libraryHariz Mustafa
 
Standard Template Library
Standard Template LibraryStandard Template Library
Standard Template LibraryKumar Gaurav
 
Coletanea booter antenatv
Coletanea booter antenatvColetanea booter antenatv
Coletanea booter antenatvVenicio Pontes
 
C++ Standard Template Library
C++ Standard Template LibraryC++ Standard Template Library
C++ Standard Template LibraryDuda Dornelles
 
VHF/UHF Uplink Solutions for Remote Wireless Sensor Networks - Bifrost Meeting
VHF/UHF Uplink Solutions for Remote Wireless Sensor Networks - Bifrost MeetingVHF/UHF Uplink Solutions for Remote Wireless Sensor Networks - Bifrost Meeting
VHF/UHF Uplink Solutions for Remote Wireless Sensor Networks - Bifrost MeetingAlp Sayin
 
VHF/UHF Uplink Solutions for Remote Wireless Sensor Networks - Thesis Defense
VHF/UHF Uplink Solutions for Remote Wireless Sensor Networks - Thesis DefenseVHF/UHF Uplink Solutions for Remote Wireless Sensor Networks - Thesis Defense
VHF/UHF Uplink Solutions for Remote Wireless Sensor Networks - Thesis DefenseAlp Sayin
 
Generalized Functors - Realizing Command Design Pattern in C++
Generalized Functors - Realizing Command Design Pattern in C++Generalized Functors - Realizing Command Design Pattern in C++
Generalized Functors - Realizing Command Design Pattern in C++ppd1961
 
Service now incidents-and_requests
Service now incidents-and_requestsService now incidents-and_requests
Service now incidents-and_requestsmcheyne
 
UHF/VHFEnergy Harvesting Radio System Physical and MAC Layer Consideration
UHF/VHFEnergy Harvesting Radio System Physical and MAC Layer ConsiderationUHF/VHFEnergy Harvesting Radio System Physical and MAC Layer Consideration
UHF/VHFEnergy Harvesting Radio System Physical and MAC Layer Considerationxiaohuzhang
 
Templates presentation
Templates presentationTemplates presentation
Templates presentationmalaybpramanik
 
Templates in C++
Templates in C++Templates in C++
Templates in C++Tech_MX
 

En vedette (20)

Lecture11 standard template-library
Lecture11 standard template-libraryLecture11 standard template-library
Lecture11 standard template-library
 
C++ STL 概觀
C++ STL 概觀C++ STL 概觀
C++ STL 概觀
 
Standard Template Library
Standard Template LibraryStandard Template Library
Standard Template Library
 
Service now incidents
Service now incidentsService now incidents
Service now incidents
 
Coletanea booter antenatv
Coletanea booter antenatvColetanea booter antenatv
Coletanea booter antenatv
 
C++ Standard Template Library
C++ Standard Template LibraryC++ Standard Template Library
C++ Standard Template Library
 
VHF/UHF Uplink Solutions for Remote Wireless Sensor Networks - Bifrost Meeting
VHF/UHF Uplink Solutions for Remote Wireless Sensor Networks - Bifrost MeetingVHF/UHF Uplink Solutions for Remote Wireless Sensor Networks - Bifrost Meeting
VHF/UHF Uplink Solutions for Remote Wireless Sensor Networks - Bifrost Meeting
 
VHF/UHF Uplink Solutions for Remote Wireless Sensor Networks - Thesis Defense
VHF/UHF Uplink Solutions for Remote Wireless Sensor Networks - Thesis DefenseVHF/UHF Uplink Solutions for Remote Wireless Sensor Networks - Thesis Defense
VHF/UHF Uplink Solutions for Remote Wireless Sensor Networks - Thesis Defense
 
Generalized Functors - Realizing Command Design Pattern in C++
Generalized Functors - Realizing Command Design Pattern in C++Generalized Functors - Realizing Command Design Pattern in C++
Generalized Functors - Realizing Command Design Pattern in C++
 
Service now incidents-and_requests
Service now incidents-and_requestsService now incidents-and_requests
Service now incidents-and_requests
 
WWOR Fox Ch9
WWOR Fox Ch9WWOR Fox Ch9
WWOR Fox Ch9
 
UHF/VHFEnergy Harvesting Radio System Physical and MAC Layer Consideration
UHF/VHFEnergy Harvesting Radio System Physical and MAC Layer ConsiderationUHF/VHFEnergy Harvesting Radio System Physical and MAC Layer Consideration
UHF/VHFEnergy Harvesting Radio System Physical and MAC Layer Consideration
 
Templates in c++
Templates in c++Templates in c++
Templates in c++
 
C++ Template
C++ TemplateC++ Template
C++ Template
 
Templates
TemplatesTemplates
Templates
 
Templates presentation
Templates presentationTemplates presentation
Templates presentation
 
Generic Programming
Generic ProgrammingGeneric Programming
Generic Programming
 
VSAT Technology
VSAT TechnologyVSAT Technology
VSAT Technology
 
Templates in C++
Templates in C++Templates in C++
Templates in C++
 
Vsat
VsatVsat
Vsat
 

Similaire à Stl (standard template library)

Data Strucure with STL
Data Strucure with STL Data Strucure with STL
Data Strucure with STL Mohamed Essam
 
Scala collections api expressivity and brevity upgrade from java
Scala collections api  expressivity and brevity upgrade from javaScala collections api  expressivity and brevity upgrade from java
Scala collections api expressivity and brevity upgrade from javaIndicThreads
 
An Introduction to the C++ Standard Library
An Introduction to the C++ Standard LibraryAn Introduction to the C++ Standard Library
An Introduction to the C++ Standard LibraryJoyjit Choudhury
 
Introduction to C++, Standard Library, Class Template vector.pptx
Introduction to C++, Standard  Library, Class Template  vector.pptxIntroduction to C++, Standard  Library, Class Template  vector.pptx
Introduction to C++, Standard Library, Class Template vector.pptxemsResulzade1
 
Assg 14 C++ Standard Template Library (STL)(Extra Credit .docx
Assg 14 C++ Standard Template Library (STL)(Extra Credit .docxAssg 14 C++ Standard Template Library (STL)(Extra Credit .docx
Assg 14 C++ Standard Template Library (STL)(Extra Credit .docxfestockton
 
Dynamic memory allocation and linked lists
Dynamic memory allocation and linked listsDynamic memory allocation and linked lists
Dynamic memory allocation and linked listsDeepam Aggarwal
 
CSharp for Unity - Day 1
CSharp for Unity - Day 1CSharp for Unity - Day 1
CSharp for Unity - Day 1Duong Thanh
 
Os Reindersfinal
Os ReindersfinalOs Reindersfinal
Os Reindersfinaloscon2007
 
Os Reindersfinal
Os ReindersfinalOs Reindersfinal
Os Reindersfinaloscon2007
 
12_-_Collections_Framework
12_-_Collections_Framework12_-_Collections_Framework
12_-_Collections_FrameworkKrishna Sujeer
 
Standard Template Library (STL) in Object Oriented Programming
Standard Template Library (STL) in Object Oriented ProgrammingStandard Template Library (STL) in Object Oriented Programming
Standard Template Library (STL) in Object Oriented ProgrammingMandeep Singh
 

Similaire à Stl (standard template library) (20)

Data Strucure with STL
Data Strucure with STL Data Strucure with STL
Data Strucure with STL
 
2CPP16 - STL
2CPP16 - STL2CPP16 - STL
2CPP16 - STL
 
C++ STL
C++ STLC++ STL
C++ STL
 
Sysprog 9
Sysprog 9Sysprog 9
Sysprog 9
 
Scala collections api expressivity and brevity upgrade from java
Scala collections api  expressivity and brevity upgrade from javaScala collections api  expressivity and brevity upgrade from java
Scala collections api expressivity and brevity upgrade from java
 
An Introduction to the C++ Standard Library
An Introduction to the C++ Standard LibraryAn Introduction to the C++ Standard Library
An Introduction to the C++ Standard Library
 
Introduction to C++, Standard Library, Class Template vector.pptx
Introduction to C++, Standard  Library, Class Template  vector.pptxIntroduction to C++, Standard  Library, Class Template  vector.pptx
Introduction to C++, Standard Library, Class Template vector.pptx
 
C_STL_2.pptx
C_STL_2.pptxC_STL_2.pptx
C_STL_2.pptx
 
Assg 14 C++ Standard Template Library (STL)(Extra Credit .docx
Assg 14 C++ Standard Template Library (STL)(Extra Credit .docxAssg 14 C++ Standard Template Library (STL)(Extra Credit .docx
Assg 14 C++ Standard Template Library (STL)(Extra Credit .docx
 
Stl
StlStl
Stl
 
Dynamic memory allocation and linked lists
Dynamic memory allocation and linked listsDynamic memory allocation and linked lists
Dynamic memory allocation and linked lists
 
Data structures in c#
Data structures in c#Data structures in c#
Data structures in c#
 
CSharp for Unity - Day 1
CSharp for Unity - Day 1CSharp for Unity - Day 1
CSharp for Unity - Day 1
 
Os Reindersfinal
Os ReindersfinalOs Reindersfinal
Os Reindersfinal
 
Os Reindersfinal
Os ReindersfinalOs Reindersfinal
Os Reindersfinal
 
Unit v
Unit vUnit v
Unit v
 
12_-_Collections_Framework
12_-_Collections_Framework12_-_Collections_Framework
12_-_Collections_Framework
 
Collections
CollectionsCollections
Collections
 
Standard Template Library (STL) in Object Oriented Programming
Standard Template Library (STL) in Object Oriented ProgrammingStandard Template Library (STL) in Object Oriented Programming
Standard Template Library (STL) in Object Oriented Programming
 
AI_2nd Lab.pptx
AI_2nd Lab.pptxAI_2nd Lab.pptx
AI_2nd Lab.pptx
 

Dernier

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Dernier (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Stl (standard template library)

  • 1. PERSTATION ON (STL) Standard Template Library BY HEMANT JAIN ROLL NO. 22
  • 2.
  • 3.
  • 4. STL (Standard Template Library) Algorithms Container Classes A library of class and function templates based on work in generic programming done by Alex Stepanov and Meng Lee of the Hewlett Packard Laboratories in the early 1990s. vector sort() begin() end() Iterates
  • 5.
  • 6.                                                
  • 7.
  • 8. STL's Containers In 1994, STL was adopted as a standard part of C++. There are some containers in STL: Kind of Container STL Containers Sequential: deque , list , vector Associative: map , multimap , multiset , set Adapters: priority_queue , queue , stack Non-STL: bitset , valarray , string
  • 9.
  • 10. Sequence Containers Ex. vector<int> v1; vector<int>iterator iter; Random Quick random access, slow insertion/deletion in middle, size can not be changed at runtime array Iterator Description Container Random Double ended queue, direct access, slow insert/delete in middle, fast at beg/ end deque Bidir. Doubly link list, fast insert/delete anywhere, slow random access list Random Dynamic array, quick random access, slow insertion/deletion in middle, fast at back vector
  • 11. Associative Containers Ex. set<int> s1; Bidir. Stores key-value pair, Unique keys, one-to-one mapping Map Iterator Description Container Bidir. Stores key-value pair, Multiple keys, one-to-many mapping Multimap Bidir. Stores non-unique key objects Multiset Bidir. Stores unique key objects, allows rapid look up Set
  • 12. Derived Containers/Container Adapters Ex. stack <deque<int> > s1; Iterator Description Container None Element of highest priority popped. Create from vector or dequeue Priority -queue None FIFO. Create from list or dequeue Queue None LIFO. Create from vector, list or dequeue Stack
  • 13.
  • 15.
  • 16.
  • 17.
  • 18. STL SEQUENCE CONTAINERS CONTAINER ADAPTORS ASSOCIATIVE CONTAINER OTHER CONTAINERS VECTOR LIST DEQUE QUEUE PRIORITY_ QUEUE STACK SET HASH_SET MULIT_SET HASH_MULTISE T MAP HASH_MAP MULITMAP HASH_MULITMAP BITSET VALARRAY