#### Category : stl

i WANT TO KNOW THAT CAN WE USE C++ STL TO MAKE PROJECTS WHICH WILL BE USED ON A LARGE SCALE OR WE USE JUST IN CODING. Source: Windows Que..

numpy has an implementation of the unique algorithm that returns : the sorted unique elements of a numpy array (i.e. with no duplicates) In addition, numpy.unique() can also return : the indices of the input array that give the unique values the indices of the unique array that reconstruct the input array The C++ standard ..

I am working on a problem where I calculate the number of possible paths to a lattice of N * N possible options. There have been some mathematical answers that suggest a simple "combinatorics" answer, but I have no experience with combinatorics. Searching around I found this relatively short answer, but it does not make ..

I have vector of strings, and I need to check if the array contains duplicates: std::vector<std::string> data{}; const bool notContainsDuplicates = …; Can I solve this problem with standard library? Source: Windows Que..

I read somewhere saying find() is not thread safe on binary map STL because when other thread is inserting to the map, the map itself is re-balancing, so find() may not return the proper iterator even the entry is indeed in the map. My observation tends to echo this. How about hash map (unordered_map)? I ..

I am working on a problem where I create a program to calculate the number of possible paths to a lattice of N * N possible options. There have been some mathematical answers that suggest a simple "combinatorics" answer, but I have only basic calculus knowledge. When approached with such a question I try to ..

Is there a way, in C++20, to convert an unordered_map to an unordered_set when both have the same hashing function ? Looping over one, and inserting to the other, would rehash the same keys again. I want to avoid this if I can. The only way I can think of, is a custom Hash function ..