Location via proxy:
[ UP ]
[Report a bug]
[Manage cookies]
No cookies
No scripts
No ads
No referrer
Show this form
Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
5 views
DataStructuresCheatSheet
Cheat sheet of important data structures
Uploaded by
f20220732
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save DataStructuresCheatSheet For Later
Download
Save
Save DataStructuresCheatSheet For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
5 views
DataStructuresCheatSheet
Cheat sheet of important data structures
Uploaded by
f20220732
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save DataStructuresCheatSheet For Later
Carousel Previous
Carousel Next
Save
Save DataStructuresCheatSheet For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 6
Search
Fullscreen
‘12424, 1:56 AM Cheatsheets / C++ for Programmers C++'s Built-In Data vectors In C+4,a vector isa data structure that stores a sequence of elements that can be accested by index. Unlike arrays, vectors can dynamically shrink and grow in ‘The standard
‘extracted only from one end of the container. + push) add an element atthe top of the stack + .pop() remove the element atthe top of the stack Queues are designed to operate ina Fist-In-First-Out context (FIFO), where elements are inserted into one end ‘of the container and extracted from the other. + .push() add an element at the end of the queue, RP + -pop() remove the element atthe front ofthe queue. f empty push (10) ; push (9 push (8 front () <<" "; hitps:www-codecademy,comilearne-pls-plisfor-programmersimodulesicpp-bull-in-date-stucturesicheatshest 26‘12424, 1:58 AM Sets In C++, a sets a data structure that contains a collection ‘of unique elements. Elements of a set are index by thelr ‘own values, oF keys set cannot contain duplicate elements. Once an ‘element has been added to a set, that element cannot be modified. ‘The following methods apply to both unordered_set and set + insert() : add an element to the set + .erase() : removes an element from the set + -count() : check whether an element exists in the + -size() sreturn the size ofthe set. htips:siww-codecasemy comileare:plus-plus-for-programmersimoduleslepp-bl-n-data-stucturesicheatshest “[eodelcademy nsert (11) not inse erase (2); erase (13); // Outputs: primes does not contain 2. contains 2.\n"; mes does not contain 316‘2024, 1:56 AM arrays Arrays in C++ are used to stare a collection of values of 1 the same type. The size of an array is specified when itis declared and cannot change afterward, Use [] and an integer index to access an array element, ng nanesr 3 Keep in mind: array indices start with O, not 1 1 ‘A multidimensional array Is an “array of arrays" and is. declared by adding extra sets of indices to the array Outputs: har 3113 outputs: hitps:www-codecademy,comilearne-pls-plisfor-programmersimodulesicpp-bull-in-date-stucturesicheatshest 416‘12424, 1:58 AM Hash Maps In C+4, a hash map is a data structure that contains a collection of unique elements in the form of key-value Pairs. Elements of a hash map are identified by key values, while the mapped values are the content associated with the keys. Each element of a map or unordered_map is an object of type pair .A pair object has two member variables: + first isthe value of the key + second is the mapped value ‘The following methods apply to both unordered_map and map + insert() : add an element to the map. + .crase() : removes an element from the map. + .count() : check whether an element exists in the map, + -size() return the size of the map. + [] operater: © lithe specified key matches an element in the map, then access the mapped value associated with that key. © Ifthe specified key doesn't match any element in the map, add a new element to the map with that key. “[eodelcademy "Japan"} = 81; uw a new element Thailand") = 66; // Access an element // Outputs: There isn't a code for Belgium elgium")} << "There is a code f i“ “ utputs: Japan 81 https sww-codecasemy comileare:plus-plus-for-programmersimoduleslepp-bll-n-data-stucuresicheatshest 56/ thailand 66 [eodelcademy ee "\n"; cb Print 8 Share v hitps:www-codecademy,comilearne-pls-plisfor-programmersimodulesicpp-bull-in-date-stucturesicheatshest ars
You might also like
C++ For Programmers - C++'s Built-In Data Structures Cheatsheet - Codecademy
PDF
No ratings yet
C++ For Programmers - C++'s Built-In Data Structures Cheatsheet - Codecademy
6 pages
DSA Cheat Sheet
PDF
No ratings yet
DSA Cheat Sheet
24 pages
C++ For Programmers - C++'s Built-In Data Structures Cheatsheet - Codecademy
PDF
No ratings yet
C++ For Programmers - C++'s Built-In Data Structures Cheatsheet - Codecademy
6 pages
C++ STL
PDF
No ratings yet
C++ STL
12 pages
Lecture 6
PDF
No ratings yet
Lecture 6
3 pages
Algo 3
PDF
No ratings yet
Algo 3
8 pages
Lecture6 Slides
PDF
No ratings yet
Lecture6 Slides
63 pages
CH 09
PDF
No ratings yet
CH 09
32 pages
C++ STL (Quickest Way To Learn, Even For Absolute Beginners)
PDF
No ratings yet
C++ STL (Quickest Way To Learn, Even For Absolute Beginners)
19 pages
Basic Data Structures: University of Technology and Engineering Vietnam National University Hanoi
PDF
No ratings yet
Basic Data Structures: University of Technology and Engineering Vietnam National University Hanoi
34 pages
C++ STL
PDF
No ratings yet
C++ STL
18 pages
DSA Day 5
PDF
No ratings yet
DSA Day 5
10 pages
Takeuforward Org C Vector in C STL
PDF
No ratings yet
Takeuforward Org C Vector in C STL
3 pages
DSA TillL21 Merged
PDF
No ratings yet
DSA TillL21 Merged
172 pages
DSA TillL36 Merged
PDF
No ratings yet
DSA TillL36 Merged
368 pages
C++ STL (quickest way to learn, even for absolute beginners)
PDF
No ratings yet
C++ STL (quickest way to learn, even for absolute beginners)
18 pages
STL List Vector
PDF
No ratings yet
STL List Vector
34 pages
STL Concept
PDF
No ratings yet
STL Concept
12 pages
Ace The Basics Final
PDF
No ratings yet
Ace The Basics Final
29 pages
DSA-Chapter-3.1-2024 (1)
PDF
No ratings yet
DSA-Chapter-3.1-2024 (1)
9 pages
Chapter 4 PPT
PDF
No ratings yet
Chapter 4 PPT
30 pages
Data Structure
PDF
No ratings yet
Data Structure
8 pages
Data_Structures_Guide
PDF
No ratings yet
Data_Structures_Guide
2 pages
Advanced Programming Workshop Day2
PDF
No ratings yet
Advanced Programming Workshop Day2
37 pages
What Simple CPP Tricks Should Everyone Know
PDF
No ratings yet
What Simple CPP Tricks Should Everyone Know
3 pages
Algorithms in The STL Are Procedures That Are Applied
PDF
No ratings yet
Algorithms in The STL Are Procedures That Are Applied
34 pages
l26STLContainersAssociative (1)
PDF
No ratings yet
l26STLContainersAssociative (1)
15 pages
DSA Interview Cheatsheet
PDF
No ratings yet
DSA Interview Cheatsheet
38 pages
CS106B Notes
PDF
No ratings yet
CS106B Notes
8 pages
DataStructures Cheatsheet Zero To Mastery V1.01
PDF
No ratings yet
DataStructures Cheatsheet Zero To Mastery V1.01
39 pages
STL
PDF
No ratings yet
STL
37 pages
Standard Template Library in C++
PDF
No ratings yet
Standard Template Library in C++
11 pages
Standard Template Library
PDF
No ratings yet
Standard Template Library
38 pages
Lecture Week 1 19022024 110309am
PDF
No ratings yet
Lecture Week 1 19022024 110309am
30 pages
Data Structures Unit 1
PDF
No ratings yet
Data Structures Unit 1
60 pages
C++ VLSQDMA&DA
PDF
No ratings yet
C++ VLSQDMA&DA
33 pages
L15 Maps and Hashes
PDF
No ratings yet
L15 Maps and Hashes
41 pages
DS
PDF
No ratings yet
DS
25 pages
STLs
PDF
No ratings yet
STLs
7 pages
Lecture14 Handouts
PDF
No ratings yet
Lecture14 Handouts
69 pages
Data Structures & Algorithms in C
PDF
No ratings yet
Data Structures & Algorithms in C
17 pages
dsac
PDF
No ratings yet
dsac
38 pages
Dsa MK Lect1
PDF
No ratings yet
Dsa MK Lect1
109 pages
Introduction
PDF
No ratings yet
Introduction
51 pages
Senior Five Mce MPC Notes Data Structure and Algorithms
PDF
No ratings yet
Senior Five Mce MPC Notes Data Structure and Algorithms
122 pages
03 Set Map-660-16913454342052
PDF
No ratings yet
03 Set Map-660-16913454342052
14 pages
Unit-1
PDF
No ratings yet
Unit-1
32 pages
Data Structures in C
PDF
No ratings yet
Data Structures in C
11 pages
Lesson One-Data Structures
PDF
No ratings yet
Lesson One-Data Structures
6 pages
ee3490e chapter 4+5
PDF
No ratings yet
ee3490e chapter 4+5
38 pages
Intro - To - Data Structure - Lec - 1
PDF
No ratings yet
Intro - To - Data Structure - Lec - 1
29 pages
Container Classes in C++
PDF
No ratings yet
Container Classes in C++
34 pages
(7) Introduction to (More) ADTs(1)
PDF
No ratings yet
(7) Introduction to (More) ADTs(1)
17 pages
Chapter 4 Data Structure
PDF
No ratings yet
Chapter 4 Data Structure
26 pages
C++ Dat Structures
PDF
No ratings yet
C++ Dat Structures
44 pages
Nikunj 23cs26
PDF
No ratings yet
Nikunj 23cs26
22 pages
Standard Template Library
PDF
No ratings yet
Standard Template Library
36 pages
Standard Template Library
PDF
No ratings yet
Standard Template Library
36 pages
Related titles
Click to expand Related Titles
Carousel Previous
Carousel Next
C++ For Programmers - C++'s Built-In Data Structures Cheatsheet - Codecademy
PDF
C++ For Programmers - C++'s Built-In Data Structures Cheatsheet - Codecademy
DSA Cheat Sheet
PDF
DSA Cheat Sheet
C++ For Programmers - C++'s Built-In Data Structures Cheatsheet - Codecademy
PDF
C++ For Programmers - C++'s Built-In Data Structures Cheatsheet - Codecademy
C++ STL
PDF
C++ STL
Lecture 6
PDF
Lecture 6
Algo 3
PDF
Algo 3
Lecture6 Slides
PDF
Lecture6 Slides
CH 09
PDF
CH 09
C++ STL (Quickest Way To Learn, Even For Absolute Beginners)
PDF
C++ STL (Quickest Way To Learn, Even For Absolute Beginners)
Basic Data Structures: University of Technology and Engineering Vietnam National University Hanoi
PDF
Basic Data Structures: University of Technology and Engineering Vietnam National University Hanoi
C++ STL
PDF
C++ STL
DSA Day 5
PDF
DSA Day 5
Takeuforward Org C Vector in C STL
PDF
Takeuforward Org C Vector in C STL
DSA TillL21 Merged
PDF
DSA TillL21 Merged
DSA TillL36 Merged
PDF
DSA TillL36 Merged
C++ STL (quickest way to learn, even for absolute beginners)
PDF
C++ STL (quickest way to learn, even for absolute beginners)
STL List Vector
PDF
STL List Vector
STL Concept
PDF
STL Concept
Ace The Basics Final
PDF
Ace The Basics Final
DSA-Chapter-3.1-2024 (1)
PDF
DSA-Chapter-3.1-2024 (1)
Chapter 4 PPT
PDF
Chapter 4 PPT
Data Structure
PDF
Data Structure
Data_Structures_Guide
PDF
Data_Structures_Guide
Advanced Programming Workshop Day2
PDF
Advanced Programming Workshop Day2
What Simple CPP Tricks Should Everyone Know
PDF
What Simple CPP Tricks Should Everyone Know
Algorithms in The STL Are Procedures That Are Applied
PDF
Algorithms in The STL Are Procedures That Are Applied
l26STLContainersAssociative (1)
PDF
l26STLContainersAssociative (1)
DSA Interview Cheatsheet
PDF
DSA Interview Cheatsheet
CS106B Notes
PDF
CS106B Notes
DataStructures Cheatsheet Zero To Mastery V1.01
PDF
DataStructures Cheatsheet Zero To Mastery V1.01
STL
PDF
STL
Standard Template Library in C++
PDF
Standard Template Library in C++
Standard Template Library
PDF
Standard Template Library
Lecture Week 1 19022024 110309am
PDF
Lecture Week 1 19022024 110309am
Data Structures Unit 1
PDF
Data Structures Unit 1
C++ VLSQDMA&DA
PDF
C++ VLSQDMA&DA
L15 Maps and Hashes
PDF
L15 Maps and Hashes
DS
PDF
DS
STLs
PDF
STLs
Lecture14 Handouts
PDF
Lecture14 Handouts
Data Structures & Algorithms in C
PDF
Data Structures & Algorithms in C
dsac
PDF
dsac
Dsa MK Lect1
PDF
Dsa MK Lect1
Introduction
PDF
Introduction
Senior Five Mce MPC Notes Data Structure and Algorithms
PDF
Senior Five Mce MPC Notes Data Structure and Algorithms
03 Set Map-660-16913454342052
PDF
03 Set Map-660-16913454342052
Unit-1
PDF
Unit-1
Data Structures in C
PDF
Data Structures in C
Lesson One-Data Structures
PDF
Lesson One-Data Structures
ee3490e chapter 4+5
PDF
ee3490e chapter 4+5
Intro - To - Data Structure - Lec - 1
PDF
Intro - To - Data Structure - Lec - 1
Container Classes in C++
PDF
Container Classes in C++
(7) Introduction to (More) ADTs(1)
PDF
(7) Introduction to (More) ADTs(1)
Chapter 4 Data Structure
PDF
Chapter 4 Data Structure
C++ Dat Structures
PDF
C++ Dat Structures
Nikunj 23cs26
PDF
Nikunj 23cs26
Standard Template Library
PDF
Standard Template Library
Standard Template Library
PDF
Standard Template Library