Given N buckets and the infinite number of balls. The maximum capacity of each bucket is given in an array capacity[], the task is to… Read More
Tag Archives: cpp-vector
Given an array arr[] of integers and an integer K, the task is to find the minimum number of operations required to make every Kth… Read More
Given an input matrix mat[][] of size m*m and the task is to convert the given matrix into a difference matrix of the same size… Read More
Given an input array, the task is to convert the given array into an ‘even array’. An even array is an array where every number… Read More
Given a Matrix of size M * N (0-indexed) and an integer K, the matrix contains distinct integers only, the task is to sort the… Read More
Given N chairs are arranged in a circle, and M people are standing in the circle facing the chairs. When the music starts playing, the… Read More
Given an array arr[], find the maximum sum that can be achieved by picking a subsequence such that the difference between consecutive elements in the… Read More
Prerequisite: Vectors in C++ STL File Handling in C++ The C++ Standard Template Library (STL) provides several useful container classes that can be used to… Read More
Prerequisites: Structure in C++ Vector in C++ A structure is a user-defined data type that groups together related data items of different data types. Structures… Read More
Prerequisites: Vector in C++ Strings in C++ Here, we will discuss how to convert the vector of chars to std::string in C++. There are mainly… Read More
Prerequisite: Set in C++ STL Vector in C++ Containers are meant to be storing elements according to the properties they have, but in some cases,… Read More
Prerequisites: STL in C++ Vector in C++ File handling in C++ The Standard Template Library (STL) is a set of C++ template classes to provide… Read More
A vector is a type of container which can store objects of similar data type. Vector acts like a dynamic array where we can insert… Read More
Prerequisite: Vector in C++ Vectors in C++ are the same as arrays with dynamic sizes having the ability to resize themselves, we can insert and… Read More
Prerequisite: Vector in C++ String in C++ Split String By Space Into Vector In C++, so we need to insert every character into a vector… Read More