Skip to content

My solutions to the problems from The Modern C++ Challenge by Marius Bancila

License

Notifications You must be signed in to change notification settings

LesnyRumcajs/ModernCppChallenge

Repository files navigation

Modern C++ Challenge

works badge CircleCI codecov Language grade: C/C++

My solutions to the problems from The Modern C++ Challenge by Marius Bancila

Required libraries:

  • boost (boost-devel package)
  • tbb (tbb-devel package)
  • pugixml (pugixml-devel package)
  • gtest / gmock - will be downloaded automatically.

Math

  • Sum of naturals divisible by 3 and 5
  • Greates common divisor
  • Least common multpile
  • Largest prime smaller than given number
  • Sexy prime pairs
  • Abundant numbers
  • Amicable numbers
  • Armstrong numbers
  • Prime factors of a number
  • Gray code
  • Converting numerical values to Roman
  • Largest Collatz sequence
  • Computing the value of Pi
  • Validating ISBNs

Language features

  • IPv4 data type
  • Enumerating IPv4 addresses in a range
  • Creating a 2D array with basic operations
  • Minimum function with any number of arguments
  • Adding a range of values to a container
  • Container any, all, none
  • System handle wrapper
  • Literals of various temperature scales

Strings and regular expressions

  • Binary to string conversion
  • String to binary conversion
  • Capitalizing an article title
  • Joining strings together separated by a delimiter
  • Splitting a string into tokens with a list of possible delimiters
  • Longest palindromit substring
  • License plate validation
  • Extracting URL parts
  • Transforming dates in strings

Streams and Filesystems

  • Pascal's triangle
  • Tabular printing of a list of processes
  • Removing empty lines from a text file
  • Computing the size of a directory
  • Deleting files older than a given date
  • Finding files in a directory that match a regular expression
  • Temporary log files

Date and Time

  • Measuring function execution time
  • Number of days between two dates
  • Day of the week
  • Day and week of the year
  • Meeting time for multiple time zones
  • Monthly calendar

Algorithms and Data Structures

  • Priority queue
  • Circular buffer
  • Double buffer
  • The most frequent element in a range
  • Text histogram
  • Filtering a list of phone numbers
  • Transforming a list of phone numbers
  • Generating all the permutations of a string
  • Average rating of movies
  • Pairwise algorithm
  • Zip algorithm
  • Select algorithm
  • Sort algorithm
  • The shortest path between nodes
  • The Weasel program
  • The Game of Life

Concurrency

  • Parallel transform
  • Parallel min-max search with threads
  • Parallel min-max search with asynchronous functions
  • Parallel sort
  • Thread-safe terminal logging
  • Custom service system

Design patterns

  • Password validation (Decorator)
  • Password generator (Composite)
  • Social insurance number generator (Template Method)
  • Acceptance system (Chain of Responsibility)
  • Observed vector container (Observer)
  • Calculating price with discounts

Serialization

  • XML serialization / deserialization (Boost)
  • Extracting data from XML with XPath (pugixml)

About

My solutions to the problems from The Modern C++ Challenge by Marius Bancila

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published