Category: c / c++
Here are the 10 questions to test your C++ advanced topics skills (correct answers are marked in BOLD): You want to use std::map as a lookup table, but you …
The C++ fill is provided in xutility and it allows us to copy a value into a range either vector or array. The std::fill() is defined using template: template<class …
The C++ method iota (not to be confused with itoa which is to convert integers to string), is defined in header numeric. Its purpose is to compute increasing values …
Given a binary tree and a sum, find all root-to-leaf paths where each path’s sum equals the given sum. Note: A leaf is a node with no children. Example: …
Given a collection of numbers that might contain duplicates, return all possible unique permutations. Example: Input: Output: , , ] How to Get Unique Permuations in C++? In fact, …