C++ STL Algorithms : Challenge your design skills

C++ STL Algorithms : Challenge your design skills

The emphasis on learning C++ from an interview perspective leads to a reinventing wheel syndrome amongst developers. The container library usage has become a norm thanks to C++11. But using the algorithms library remains a challenge.


  • Assist you in becoming self-sufficient as a C++ programmer.
  • Convince you about thinking algorithms first.
  • Present enough realistic examples to get the prototyping habit in muscle memory.
  • Not to take up months of your time to explain something you can learn and use in a matter of hours!

Why so few questions?

The course intends to assist you in becoming self-dependent. The seemingly few questions are enough for you to test the waters and get going on your journey to command line mastery.

*******  sample question **************

  • Assume you are implementing a domain-specific language.
  • You initially borrowed the parser by forking an open-source project.
  • The original specification and implementation did not mention case sensitivity in the query language.
  • After confusion in documentation, the product manager has decided to make the language case sensitive, only lower case.
  • You are writing a function for backward compatibility of the older query language. If submitted, your function needs to ensure the older queries get formatted according to new case compliance and generate a warning message about deprecation.

Which of the following algorithms can help you ensure consistent case formatting?


Under normal circumstances, one has to memorize such answers, but the course focuses on the process of you getting to the solution and not the answer itself! Of course, you are welcome to suggest additions; remember, you have lifetime access to content. Your suggestion will benefit everyone in the community.


  • Since interviews ask for search and sort algorithms, most developers believe they always have to implement them from scratch, even in production! 
  • The reinvention may lead to bugs.
  • Every time a new developer reads the code, they must reinterpret the algorithm from scratch.
  • Without up-to-date comments and documentation, one can easily misinterpret the code.
  • A reinvented algorithm cannot benefit from the upgrades to the language. For example, the ranges library is available, but homegrown implementations cannot benefit from it without significant engineering efforts.
  • Testing overage with corner cases of homegrown reimplementations is hard to maintain.

How to use the course?

  • Every question presents a use case.
  • Read the options and try to create minimal dummy data to test with.
  • Plugin all options and verify if your selected option works.
  • Choose the answer.
  • Read the “Review Questions” section at the end of each practice test to get more information and references.

Who this course is for:

  • Beginner Developers who started using C++ recently
  • Students who are learning C++
  • Intermediate developers diving deeper into C++ facilities.
  • Intermediate developers looking to modernize and standardize their C++ codebase.



We will be happy to hear your thoughts

Leave a reply

awsomenews Free Online Courses