Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Data Structures and Algorithms with the C++ STL

You're reading from   Data Structures and Algorithms with the C++ STL A guide for modern C++ practitioners

Arrow left icon
Product type Paperback
Published in Feb 2024
Publisher Packt
ISBN-13 9781835468555
Length 458 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
John Farrier John Farrier
Author Profile Icon John Farrier
John Farrier
Arrow right icon
View More author details
Toc

Table of Contents (30) Chapters Close

Preface 1. Part 1: Mastering std::vector FREE CHAPTER
2. Chapter 1: The Basics of std::vector 3. Chapter 2: Mastering Iterators with std::vector 4. Chapter 3: Mastering Memory and Allocators with std::vector 5. Chapter 4: Mastering Algorithms with std::vector 6. Chapter 5: Making a Case for std::vector 7. Part 2: Understanding STL Data Structures
8. Chapter 6: Advanced Sequence Container Usage 9. Chapter 7: Advanced Ordered Associative Container Usage 10. Chapter 8: Advanced Unordered Associative Container Usage 11. Chapter 9: Advanced Container Adaptor Usage 12. Chapter 10: Advanced Container View Usage 13. Part 3: Mastering STL Algorithms
14. Chapter 11: Fundamental Algorithms and Searching 15. Chapter 12: Manipulation and Transformation 16. Chapter 13: Numeric and Range -Based Operations 17. Chapter 14: Permutations, Partitions, and Heaps 18. Chapter 15: STL with Ranges 19. Part 4: Creating STL-Compatible Types and Algorithms
20. Chapter 16: Creating STL-Types Containers 21. Chapter 17: Creating STL -Compatible Algorithms 22. Chapter 18: Type Traits and Policies 23. Part 5: STL Data Structures and Algorithms: Under the Hood
24. Chapter 19: Exception Safety 25. Chapter 20: Thread Safety and Concurrency with the STL 26. Chapter 21: STL Interaction with Concepts and Coroutines 27. Chapter 22: Parallel Algorithms with the STL 28. Index 29. Other Books You May Enjoy

Mastering Algorithms with std::vector

In this chapter, we will explore the interaction of std::vector with C++ Standard Template Library (STL) algorithms to unlock the potential of the C++ STL. This chapter delineates the process of efficiently sorting, searching, and manipulating vectors, leveraging the algorithms provided in the header. Moreover, focusing on lambda expressions, custom comparators, and predicates establishes a clear path to customizable, concise, and efficient vector operations.

In this chapter, we will cover the following topics:

  • Sorting a vector
  • Searching elements
  • Manipulating vectors
  • Custom comparators and predicates
  • Understanding container invariants and iterator invalidation
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime