30 Seconds of C++ (STL in C++). Read More about 30C++ here 👉

Overview

30 Seconds of C++

30 Seconds Of Standard Template Library in C++



A collection of C++ STL features (functions/libraries) which can be learned in 30 seconds or less


Codacy Badge PRs Welcome LICENSE Build Status CodeFactor Open Source Helpers GitHub contributors


Header Files


Algorithm

View contents
  1. accumulate
  2. adjacent_difference
  3. adjacent_find
  4. all_of
  5. any_of
  6. binary_search
  7. clamp
  8. copy
  9. copy_backward
  10. copy_if
  11. copy_n
  12. count
  13. count_if
  14. equal
  15. equal_range
  16. fill
  17. fill_n
  18. find
  19. find_first_of
  20. find_if
  21. find_if_not
  22. for_each
  23. for_each_n
  24. generate
  25. includes
  26. iota
  27. is_heap
  28. is_permutation
  29. is_sorted
  30. iter_swap
  31. lexicographical_compare
  32. linear_search
  33. lower_bound
  34. make_heap
  35. max
  36. max_element
  37. merge
  38. min
  39. min_element
  40. minimax_element
  41. minmax
  42. minmax_element
  43. mismatch
  44. move
  45. next_permutation
  46. none_of
  47. nth_element
  48. partition
  49. pop_heap
  50. prev_permutation
  51. push_heap
  52. random_shuffle
  53. remove
  54. remove_copy
  55. remove_copy_if
  56. remove_if
  57. replace
  58. replace_copy
  59. replace_copy_if
  60. replace_if
  61. reverse
  62. reverse_copy
  63. rotate
  64. search
  65. search_n
  66. set_difference
  67. set_intersection
  68. set_union
  69. shuffle
  70. sort
  71. stable_sort
  72. swap
  73. transform
  74. transform_reduce
  75. unique
  76. upper_bound

List

View contents
  1. assign
  2. back
  3. begin
  4. cbegin
  5. cend
  6. clear
  7. crbegin
  8. crend
  9. emplace
  10. emplace_back
  11. empty
  12. end
  13. erase
  14. front
  15. insert
  16. max_size
  17. merge
  18. pop_front
  19. rbegin
  20. remove
  21. rend
  22. resize
  23. reverse
  24. size
  25. sort
  26. splice
  27. swap
  28. unique

Map

View contents
  1. begin
  2. cbegin
  3. cend
  4. clear
  5. contains
  6. count
  7. crbegin
  8. crend
  9. emplace
  10. emplace_hint
  11. empty
  12. end
  13. erase
  14. find
  15. insert
  16. lower_bound
  17. max_size
  18. rbegin
  19. rend
  20. size
  21. swap
  22. upper_bound

Queue

View contents
  1. back
  2. emplace
  3. empty
  4. front
  5. pop
  6. push
  7. queue
  8. size
  9. swap

Set

View contents
  1. begin
  2. cbegin
  3. cend
  4. clear
  5. contains
  6. count
  7. emplace
  8. emplace_hint
  9. empty
  10. end
  11. equal_range
  12. erase
  13. find
  14. insert
  15. lower_bound
  16. max_size
  17. rbegin
  18. rend
  19. size
  20. swap
  21. upper_bound

Stack

View contents
  1. emplace
  2. empty
  3. pop
  4. push
  5. size
  6. swap
  7. top

Unordered_map

View contents
  1. count
  2. erase
  3. find
  4. insert
  5. size

Vector

View contents
  1. Vector
  2. assign
  3. at
  4. back
  5. begin
  6. capacity
  7. cbegin
  8. cend
  9. clear
  10. crbegin
  11. data
  12. emplace
  13. emplace_back
  14. empty
  15. end
  16. erase
  17. front
  18. get_allocator
  19. insert
  20. max_size
  21. pop_back
  22. push_back
  23. rbegin
  24. rend
  25. reserve
  26. resize
  27. shrink_to_fit
  28. size
  29. sort
  30. swap

🗣️ Community

Join other C++ enthusiasts on

🌐 30 Seconds of Knowledge

Experience 30 Seconds of C++ as a Web Extension built by Stefan Petrovic

Author

👤 Bhupesh Varshney

📝 License

This project is licensed under the MIT License. See the LICENSE file for details.

👋 Contributing

Please read the updated CONTRIBUTING for the process for submitting pull requests to us.

Comments
  • Add Run Code Links in existing code snippets

    Add Run Code Links in existing code snippets

    Add Runnable links of the code below the example. Use link name Run Code which links to a Online C++ complier conatining the example code. Use Rextester as the Online C++ Compiler (If you have a better suggesstion please comment).

    Follow below steps to generate the Run Code Link.

    1. Go to Rextester
    2. Copy or write the example code.
    3. Run the code (hit F8) , see if you face any problems
    4. Save the code with the followng title format <algo_name>_30-Seconds-of-C++
    5. A permanent link will be generated , copy that
    6. Submit a PR which contains the Run Code Link just below the example.

    Comment any doubts, suggesstions.

    enhancement good first issue beginner-friendly 
    opened by Bhupesh-V 22
  • Looking for Maintainer/Collaborator

    Looking for Maintainer/Collaborator

    I have been maintaining this project for a long time now and I think I am not able respond quickly to new PRs thus driving away future contributors.

    If you have already contributed to 30 Seconds of C++ before feel free to comment below, if you are willing to be a potential maintainer and collaborator.

    The goal of 30C++ is to make sure C++ is easier to learn by providing quick explanations of STL, while driving the beginner friendly OpenSource Contribution

    help wanted 
    opened by Bhupesh-V 5
  • Missing is_sorted() function in algorithm.

    Missing is_sorted() function in algorithm.

    Recently I have just checked this repo, I found the is_sorted() function is missing. This is_sorted() function which is related to the Algorithm. Can I make my first contribution by adding this function?

    bug 
    opened by ayush-pr0 3
  • Bug: The links in the README.md pages for each header file folder don't work

    Bug: The links in the README.md pages for each header file folder don't work

    Describe the bug All of the links in the README files in each of the header file folders are broken.

    To Reproduce Steps to reproduce the behavior:

    1. Go to algorithm, list or any of the other header file folders.
    2. View contents and try to click on any link
    3. They don't do anything

    Expected behavior I expect them to take me to the correct Markdown file. I think your update_readme.py script should also update the READMEs in each of the subfolders.

    bug 
    opened by bermani 3
  • README and CONTRIBUTING update

    README and CONTRIBUTING update

    Made some changes to the README and CONTRIBUTING guide. Added inline links to some GitHub Help pages to make the documents more robust and user-friendly. Hopefully the changes are appreciated. Thanks! ☺️

    opened by kydojo 3
  • Fix typo in std::is_heap (from <algorithm>)

    Fix typo in std::is_heap (from )

    This PR... changes one bracket to match with another

    ~~Fixes #~~ No issue opened

    Changes

    • Changed ) to ] to match with [ in algorithm/is_heap.md

    Checklist

    • [x] I have read CONTRIBUTING guidelines.
    • [x] This is a typo fix.
    • [x] I am not updating any todo.txt files.
    opened by loma-baldsson 2
  • contains.md

    contains.md

    Hello! This is my very first pull request to an open-source project, I hope it will be of some use! 😊 I added the .md file describing the contains function for std::set according to the style guide and to what other contributors have already done. I am looking forward to your feedback if I have done anything wrong!

    opened by eneiss 2
  • Showing the usage of inner_product()

    Showing the usage of inner_product()

    I have added code under the /snippets/algorithm about how to use the inner_product(). Furthermore, I have written an explanation of how inner_product() works and how to use it under the /algorithm folder as markdown. #31

    opened by kbodurri 2
  • Include other concepts of c++

    Include other concepts of c++

    The repo serves a fantastic guide to introduce new comers with the standard library of c++. It would be even great if we could add other lesser known( or used ) features of c++ here.

    • Suggestions:
      • [ ] Object Oriented Programming (not only inheritance, but also interesting topics like method chaining and this pointer)
      • [ ] Templates and variadic templates ( quite interesting ) and discussion about issues ( dos and donts ) with using templates with Classes
      • [ ] Lambda functions

    And more such interesting and rarely features of c++

    discussion feedback 
    opened by harshraj22 2
  • Add std::deque snippets

    Add std::deque snippets

    Add std::deque snippets: at, size, empty, push_back, push_front.

    Changes

    Double-ended queue std::deque is not present in snippets. Added following snippets: at, size, empty, push_back, push_front.

    Checklist

    • [x] I have read CONTRIBUTING guidelines.
    • [ ] This is a typo fix.
    • [x] I am not updating any todo.txt files.
    opened by karina-mobica 0
  • Fix a typo in todo.txt

    Fix a typo in todo.txt

    This PR fixes a typo in todo.txt

    Fixes #

    Changes

    • Fixed typo
    • inner_product.md exists in the algorithm folder
    • removed inner_product from todo.txt

    Checklist

    • [x] I have read CONTRIBUTING guidelines.
    • [x] This is a typo fix.
    • [x] I am not updating any todo.txt files.
    opened by maitiSoutrik 0
  • created min-heap priority queue

    created min-heap priority queue

    In this type of priority queue, the smallest element gets the highest priority. This PR...

    Changes

    -> I have added min-heap priority queue syntax

    Checklist

    • [x] I have read CONTRIBUTING guidelines.
    opened by sriyaradhika 0
  • Create permutation-string.cpp

    Create permutation-string.cpp

    This PR...

    Fixes #

    Changes

    Checklist

    • [ ] I have read CONTRIBUTING guidelines.
    • [ ] This is a typo fix.
    • [ ] I am not updating any todo.txt files.
    opened by parte-Ajinkya 0
  • Create Longest-Subsquence-problem.cpp

    Create Longest-Subsquence-problem.cpp

    This PR...

    Fixes #

    Changes

    Checklist

    • [ ] I have read CONTRIBUTING guidelines.
    • [ ] This is a typo fix.
    • [ ] I am not updating any todo.txt files.
    opened by parte-Ajinkya 0
Owner
Bhupesh Varshney
FOSS Enthusiast • Tech Writer • Developer • Building cool stuff every day
Bhupesh Varshney
A minimal, toy programming language implemented in C++ and STL.

od Programming Language Mod (or ModLang) is a minimal, toy programming language implemented in C++ and STL (Standard Template Library) with no other e

Pranav Shridhar 27 Dec 4, 2022
Community-gathered tests for C++ course read in YSDA

YSDA-CPP-collective-tests Коллективно собранные тесты для задач с закрытыми тестами из курса C++. Структура Структура этого репозитория соответствует

Martynov Pavel 5 Nov 1, 2021
A beginner friendly repo in the world of open source. Contribute here to add here project in any languages.

Hacktober Fest 2021 Heyy There (●'◡'●) Here you can contribute to opensource project in any valid language and project. Just follow the contribution g

Anonymous-inception 6 May 24, 2022
Cross-platform STL-styled and STL-compatible library with implementing containers, ranges, iterators, type traits and other tools; actors system; type-safe config interface.

Yato A small repository where I'm gatherting useful snippets and abstractions for C++ development. Yato includes 3 main modules: multidimensional cont

Alexey 10 Dec 18, 2022
Just loop forever, with sleep for specified seconds

loopever Just loop forever, with sleep for specified time Build & Install $ mkdkir build $ cd build $ cmake .. $ make $ make install Run $ loopever 0

Tomohito Nakayama 1 Oct 24, 2021
Solves a given NxN wordsearch in under 0.3 seconds at most using Rabin-Karp string algorithm.

ASSIGNMENT 2 The Information of the Creator: ASSIGNMENT 2 Author: Lukas Waschuk CCID: lwaschuk Date: 03-20-2021 The Purpose of Your Program: This prog

Lukas Waschuk 0 May 17, 2022
Ramp is a HID attack program that steals all connected WiFi passwords within 13 seconds.

Ramp Ramp is a HID attack program that steals all connected WiFi passwords within 13 seconds. Tested Windows 10 Warning Ramp has been created for the

Md. Ridwanul Islam Muntakim 24 Dec 24, 2022
Common files for Packet Batch. Read this for configuration guidance and more!

Packet Batch (Common) Description This is a repository for Packet Batch that includes common files for all versions of Packet Batch to use (standard,

Packet Batch 3 Oct 1, 2022
A faster drop-in replacement for giflib. It uses more RAM, but you get more speed.

GIFLIB-Turbo What is it? A faster drop-in replacement for GIFLIB Why did you write it? Starting in the late 80's, I was fascinated with computer graph

Larry Bank 27 Jun 9, 2022
Lightway Core is a modern VPN protocol by ExpressVPN, to deliver a VPN experience that’s faster, more secure, and more reliable.

Lightway Core NOTE: This is a preview snapshot of the Lightway repository used for both our client and server. We will be publishing a live, actively

ExpressVPN 22 Feb 17, 2022
Lightway Core is a modern VPN protocol by ExpressVPN, to deliver a VPN experience that’s faster, more secure, and more reliable.

Lightway Core is a modern VPN protocol by ExpressVPN, to deliver a VPN experience that’s faster, more secure, and more reliable.

ExpressVPN 390 Dec 28, 2022
Like feh, but better, faster, more image formats, simpler, more lightweight, animation support, and better UI

Like feh, but better, faster, more image formats, simpler, more lightweight, animation support, and better UI

martin 11 Oct 23, 2022
ImmortalWrt is a fork of OpenWrt, with more packages ported, more devices supported, better performance, and special optimizations for mainland China users.

ImmortalWrt is a fork of OpenWrt, with more packages ported, more devices supported, better performance, and special optimizations for mainland China users.

null 4 Jan 31, 2022
Phan Sang 17 Dec 29, 2022
3D scanning is becoming more and more ubiquitous.

Welcome to the MeshLib! 3D scanning is becoming more and more ubiquitous. Robotic automation, self-driving cars and multitude of other industrial, med

null 121 Dec 31, 2022
THIS REPOSITORY HAS MOVED TO github.com/nvidia/cub, WHICH IS AUTOMATICALLY MIRRORED HERE.

About CUB CUB provides state-of-the-art, reusable software components for every layer of the CUDA programming model: Device-wide primitives Sort, pref

NVIDIA Research Projects 65 Dec 4, 2022
stdgpu: Efficient STL-like Data Structures on the GPU

stdgpu: Efficient STL-like Data Structures on the GPU Features | Examples | Documentation | Building | Integration | Contributing | License | Contact

Patrick Stotko 777 Jan 8, 2023
STL compatible C++ memory allocator library using a new RawAllocator concept that is similar to an Allocator but easier to use and write.

memory The C++ STL allocator model has various flaws. For example, they are fixed to a certain type, because they are almost necessarily required to b

Jonathan Müller 1.2k Dec 26, 2022
Sol3 (sol2 v3.0) - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great! Documentation:

sol2 sol2 is a C++ library binding to Lua. It currently supports all Lua versions 5.1+ (LuaJIT 2.0+ and MoonJIT included). sol2 aims to be easy to use

The Phantom Derpstorm 3.3k Jan 4, 2023