Remove all occurences of an element from vector in O(n) complexity
Suppose we have a vector of integers and we want to delete all occurences of a number from it i.e.
Suppose we have a vector of integers and we want to delete all occurences of a number from it i.e.
In this article we will see how to use external Sorting Criteria i.e. Comparator in std::set.
In this article we will see how to use std::set with user defined classes.
In this article we will discuss how to use std::set with default sorting criteria.
In this we will see how to check if a given string take valid combination of open and close brackets i.e. (4+{8-[22+8]*}] contains valid order of open and close brackets. ({5+8]) contains invalid combination of open and close brackets. [showads ad=inside_post] Bracket combinations to be used, { , } [,] (,) Algo Used: Create a empty stack of characters Traverse …
Using STL to verify brackets or parentheses combination in an expression Read More »
In this article we will discuss how to use User defined classes as key in std::map.
In this article we will discuss how to use external sorting criteria for keys in std::map and points that we need to take care with external sorting criteria.
In this article we see how & why to use std::map in c++.
While creating and using std::vector with user defined classes we needs some special care otherwise it can hamper the performance of our application.
std::find and std::find_if algorithms are used to find first element in the given range.