ModernCppChallenge
My solutions to the problems from The Modern C++ Challenge by Marius Bancila
Install / Use
/learn @LesnyRumcajs/ModernCppChallengeREADME
Modern C++ Challenge
My solutions to the problems from The Modern C++ Challenge by Marius Bancila
Required libraries:
boost(boost-develpackage)tbb(tbb-develpackage)pugixml(pugixml-develpackage)gtest/gmock- will be downloaded automatically.
Math
- [x] Sum of naturals divisible by 3 and 5
- [x] Greates common divisor
- [x] Least common multpile
- [x] Largest prime smaller than given number
- [x] Sexy prime pairs
- [x] Abundant numbers
- [x] Amicable numbers
- [x] Armstrong numbers
- [x] Prime factors of a number
- [x] Gray code
- [x] Converting numerical values to Roman
- [x] Largest Collatz sequence
- [x] Computing the value of Pi
- [x] Validating ISBNs
Language features
- [x] IPv4 data type
- [x] Enumerating IPv4 addresses in a range
- [x] Creating a 2D array with basic operations
- [x] Minimum function with any number of arguments
- [x] Adding a range of values to a container
- [x] Container any, all, none
- [x] System handle wrapper
- [x] Literals of various temperature scales
Strings and regular expressions
- [x] Binary to string conversion
- [x] String to binary conversion
- [x] Capitalizing an article title
- [x] Joining strings together separated by a delimiter
- [x] Splitting a string into tokens with a list of possible delimiters
- [x] Longest palindromit substring
- [x] License plate validation
- [x] Extracting URL parts
- [x] Transforming dates in strings
Streams and Filesystems
- [x] Pascal's triangle
- [x] Tabular printing of a list of processes
- [x] Removing empty lines from a text file
- [x] Computing the size of a directory
- [x] Deleting files older than a given date
- [x] Finding files in a directory that match a regular expression
- [x] Temporary log files
Date and Time
- [x] Measuring function execution time
- [x] Number of days between two dates
- [x] Day of the week
- [x] Day and week of the year
- [x] Meeting time for multiple time zones
- [x] Monthly calendar
Algorithms and Data Structures
- [x] Priority queue
- [x] Circular buffer
- [x] Double buffer
- [x] The most frequent element in a range
- [x] Text histogram
- [x] Filtering a list of phone numbers
- [x] Transforming a list of phone numbers
- [x] Generating all the permutations of a string
- [x] Average rating of movies
- [x] Pairwise algorithm
- [x] Zip algorithm
- [x] Select algorithm
- [x] Sort algorithm
- [x] The shortest path between nodes
- [x] The Weasel program
- [x] The Game of Life
Concurrency
- [x] Parallel transform
- [x] Parallel min-max search with threads
- [x] Parallel min-max search with asynchronous functions
- [x] Parallel sort
- [x] Thread-safe terminal logging
- [x] Custom service system
Design patterns
- [x] Password validation (Decorator)
- [x] Password generator (Composite)
- [x] Social insurance number generator (Template Method)
- [x] Acceptance system (Chain of Responsibility)
- [x] Observed vector container (Observer)
- [x] Calculating price with discounts
Serialization
- [x] XML serialization / deserialization (
Boost) - [x] Extracting data from XML with XPath (
pugixml)
