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.

Issues
  • 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
  • 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
  • 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
  • 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 ayushkhandelwal9911 0
  • Added unordered_map::at(), unordered_map::emplace(), and unordered_map::swap()

    Added unordered_map::at(), unordered_map::emplace(), and unordered_map::swap()

    Added examples and snippets for unordered_map::at(), unordered_map::emplace(), unordered_map::swap()

    Changes

    Added Markdown file for unordered_map::at(), corresponding code snipped in at.cpp, and link to RexTester with said code snippet.

    Added Markdown file for unordered_map::emplace(), corresponding code snipped in emplace.cpp, and link to RexTester with said code snippet.

    Added Markdown file for unordered_map::swap(), corresponding code snipped in swap.cpp, and link to RexTester with said code snippet.

    Added a small comment to unordered_map/contains.md to specify that unordered_map::contains() is a C++20 feature.

    Checklist

    • [x] I have read CONTRIBUTING guidelines.
    • [] This is a typo fix.
    • [x] I am not updating any todo.txt files.
    opened by abust005 0
  • Create bubble sort.md

    Create bubble sort.md

    This PR...

    Fixes #

    Changes

    Checklist

    • [x] I have read CONTRIBUTING guidelines.
    • [ ] This is a typo fix.
    • [ ] I am not updating any todo.txt files.
    opened by david-ortega-molina 1
  • Update CONTRIBUTING.md

    Update CONTRIBUTING.md

    Updated spelling, grammatical and punctuation errors.

    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 lazarosdt 0
  • Linked list

    Linked list

    This PR adds a Linked List directory and provides two starting files, demonstrating insertion and removal operations in a singly linked list.

    Changes

    No existing files and directories were changed or altered.

    opened by Khudd1214 0
  • Add insert_or_assign in unordered_map

    Add insert_or_assign in unordered_map

    This PR adds instructions on the unordered_map container's insert_or_assign method.

    Checklist

    • [x] I have read CONTRIBUTING guidelines.
    • [ ] This is a typo fix.
    • [x] I am not updating any todo.txt files.
    opened by blizzardfinnegan 0
Owner
Bhupesh Varshney
FOSS Enthusiast • Tech Writer • Developer • Building cool stuff every day
Bhupesh Varshney
Welcome to my dungeon. Here, I keep all my configuration files in case I have a stroke and lose all my memory. You're very welcome to explore and use anything in this repository. Have fun!

Fr1nge's Dotfiles Welcome to my dungeon. Here, I keep all my configuration files in case I have a stroke an d lose all my memory. You're very welcome

Fr1nge 32 Apr 16, 2022
Community-gathered tests for C++ course read in YSDA

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

Martynov Pavel 5 Nov 1, 2021
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 9 Mar 7, 2022
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
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 18 Jun 10, 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 Feb 24, 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 302 Jun 15, 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 8 Apr 9, 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 4 Jun 21, 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 28 Jun 17, 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 705 Jun 27, 2022
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.1k Jun 15, 2022
Library of generic and type safe containers in pure C language (C99 or C11) for a wide collection of container (comparable to the C++ STL).

M*LIB: Generic type-safe Container Library for C language Overview M*LIB (M star lib) is a C library enabling to use generic and type safe container i

PpHd 493 Jun 20, 2022
Low dependency(C++11 STL only), good portability, header-only, deep neural networks for embedded

LKYDeepNN LKYDeepNN 可訓練的深度類神經網路 (Deep Neural Network) 函式庫。 輕量,核心部份只依賴 C++11 標準函式庫,低相依性、好移植,方便在嵌入式系統上使用。 Class diagram 附有訓練視覺化 demo 程式 訓練視覺化程式以 OpenCV

Lin Kao-Yuan 39 Apr 27, 2022
from Microsoft STL, but multi-platform

mscharconv <charconv> from Microsoft STL, but multi-platform. Tested with MSVC, gcc, and clang on Windows, Linux, and macOS (will likely work on other

Borislav Stanimirov 35 Jun 8, 2022
This program converts ASCII STL files to RT files for miniRT.

STL to RT This program converts ASCII STL files to RT files for miniRT. Input the ASCII STL file to the standard input and output the RT file from the

null 5 Mar 29, 2021
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 26 Apr 28, 2022
C++ STL in the Windows Kernel with C++ Exception Support

C++ STL in Windows Drivers This project uses MSVC C++ STL in a Windows Kernel Driver. In this solution jxystl.lib is implemented as a kernel-tuned, po

Johnny Shaw 245 Jun 24, 2022
pngtostl is a program that converts a PNG image into STL 3D models

pngtostl is a program that converts a PNG image into a litophane, in STL format, suitable to be printed by entry level 3D printers.

Salvatore Sanfilippo 157 Jun 6, 2022
Library that simplify to find header for class from STL library.

Library that simplify to find header for class from STL library. Instead of searching header for some class you can just include header with the class name.

null 6 Jun 7, 2022
header-only UTF-8 string functions based on STL-string

utf8_xxx header-only UTF-8 string functions based on STL-string size_t utf8_len(const std::string& _Str) std::string utf8_sub(const std::string& _Str,

Voidmatrix 2 Dec 27, 2021
STL compatible C++ memory allocator library using a new RawAllocator concept that is similar to an Allocator but easier to use and write.

STL compatible C++ memory allocator library using a new RawAllocator concept that is similar to an Allocator but easier to use and write.

Jonathan Müller 1k Dec 2, 2021