Skip to content

Tag Archives: cpp-array

The array::get() is a built-in function in C++ STL which returns a reference to the i-th element of the array container. Syntax: get(array_name) Parameters: The… Read More
The array::data() is a built-in function in C++ STL which returns an pointer pointing to the first element in the array object. Syntax: array_name.data() Parameters:… Read More
Given N number of elements, find the minimum number of swaps required so that the maximum element is at the beginning and the minimum element… Read More
Given a number N which represents the total distance in km to be covered by a car on a single road. There are N petrol… Read More
array::crbegin() is a built-in function in C++ STL which returns a constant reverse iterator pointing to the last element in the container. Syntax: array_name.crbegin() Parameters:… Read More
array::cbegin() is a built-in function in C++ STL which returns a const_iterator pointing to the first element in the array. It cannot be used to… Read More
array::rbegin() is a built-in function in C++ STL which returns a reverse iterator pointing to the last element in the container. Syntax: array_name.rbegin() Parameters: The… Read More
We have already discussed arrays and vectors. In this post, we will discuss advantages of vector over normal array. Advantages of Vector over arrays :… Read More
Prerequisite :Array in C/C++, More on array A four-dimensional (4D) array is an array of array of arrays of arrays or in other words 4D… Read More
Given a matrix m[ ][ ] of size n x n consisting of integers and given a character ‘x’ indicating the direction. Value of ‘x’… Read More
Given an array of integers, a number and a maximum value, task is to compute the maximum value that can be obtained from the array… Read More
Euler tour tree (ETT) is a method for representing a rooted tree as a number sequence. When traversing the tree using Depth for search(DFS), insert… Read More
The array is a collection of homogeneous objects and this array container is defined for constant size arrays or (static size). This container wraps around… Read More
Array classes are generally more efficient, light-weight and reliable than C-style arrays. The introduction of array class from C++11 has offered a better alternative for… Read More
Array classes are generally more efficient, light-weight and reliable than C-style arrays. The introduction of array class from C++11 has offered a better alternative for… Read More

Start Your Coding Journey Now!