Skip to content

Tag Archives: cpp-array

Reference to an array means aliasing an array while retaining its identity. Reference to an array will not be an int* but an int[]. Let… Read More
In this article we will discuss the implementation of the lower_bound() and upper_bound() in an array of pairs. lower_bound(): It returns an iterator pointing to… Read More
Given a vector of arrays, the task is to sort them. Examples: Input: [[1, 2, 3], [10, 20, 30], [30, 60, 90], [10, 20, 10]]… Read More
Array: An array is a collection of items stored at contiguous memory locations. The idea is to store multiple items of the same type together.… Read More
Given an array a of integers of size N integers, the task is to find the ratio of positive numbers, negative numbers and zeros in… Read More
An array is a collection of items stored at contiguous memory locations. In this article, we will see how to insert an element in an… Read More
Given an array, the task is to remove the duplicate elements from the array using STL in C++ Examples: Input: arr[] = {2, 2, 2,… Read More
Given an unsorted array, the task is to remove the duplicate elements from the array using STL in C++ Examples: Input: arr[] = {1, 2,… Read More
Given a sorted array, the task is to remove the duplicate elements from the array using STL in C++ Examples: Input: arr[] = {2, 2,… Read More
Given a binary array, the task is to count the number of 1’s and 0’s in this array using STL in C++. Examples: Input: arr[]… Read More
Given an array, the task is to find elements which are odd and even, using STL in C++ Examples: Input: a[] = {1, 2, 3,… Read More
Given an array and an integer N, find elements which are divisible by N, using STL in C++ Examples: Input: a[] = {1, 2, 3,… Read More
Given an array, the task is to print or display all the reverse permutations of this array using STL in C++. Reverse permutation means, for… Read More
Given an array, the task is to print or display all the permutations of this array using STL in C++. Examples: Input: a[] = {1,… Read More
Given an array arr[], find the minimum and maximum element of this array using STL in C++.Example:  Input: arr[] = {1, 45, 54, 71, 76,… Read More