## How to find the minimum and maximum element of a Vector using STL in C++?

Given a vector, find the minimum and maximum element of this vector using STL in C++. Example: Input: {1, 45, 54, 71, 76, 12} Output:… Read More »

- Minimum number of swaps required to sort an array | Set 2
- Rearrange Odd and Even values in Alternate Fashion in Ascending Order
- Print all pairs in an unsorted array with equal sum
- Check if a triplet with given sum exists in BST
- Count subarrays with Prime sum
- Find the missing elements from 1 to M in given N ranges | Set-2
- Minimum number of days required to complete the work
- Perform the given queries on the rooted tree
- Rearrange all elements of array which are multiples of x in decreasing order
- Difference between std::swap and std::vector::swap
- Count the number of elements in an array which are divisible by k
- Find the k-th smallest divisor of a natural number N
- Print levels with odd number of nodes and even number of nodes
- Sort perfect squares in an array at their relative positions
- Keep track of previous indexes after sorting a vector in C++ STL
- Sorting array elements with set bits equal to K
- Find four factors of N with maximum product and sum equal to N
- Get first and last elements from Array and Vector in CPP
- Count elements in a vector that match a target value or condition
- Minimum operation require to make first and last character same
- Minimum number of moves after which there exists a 3X3 coloured square
- How to reverse a Vector using STL in C++?
- Swapping of subranges from different containers in C++
- How to find the minimum and maximum element of a Vector using STL in C++?
- How to find the maximum element of a Vector using STL in C++?
- Working with Array and Vectors using STL in C++
- How to sort a Vector in descending order using STL in C++?
- How to find common elements between two Vector using STL in C++?
- How to find the sum of elements of a Vector using STL in C++?
- How to join two Vectors using STL in C++?

Given a vector, find the minimum and maximum element of this vector using STL in C++. Example: Input: {1, 45, 54, 71, 76, 12} Output:… Read More »

Given a vector, reverse this vector using STL in C++. Example: Input: vec = {1, 45, 54, 71, 76, 12} Output: {12, 76, 71, 54,… Read More »

Given a vector, find the maximum element of this vector using STL in C++. Example: Input: {1, 45, 54, 71, 76, 12} Output: 76 Input:… Read More »

Given a vector, find the sum of the elements of this vector using STL in C++. Example: Input: vec = {1, 45, 54, 71, 76,… Read More »

Given a vector, sort this vector in descending order using STL in C++. Example: Input: vec = {1, 45, 54, 71, 76, 12} Output: {76,… Read More »

Given two vectors, join these two vectors using STL in C++. Example: Input: vec1 = {1, 45, 54, 71, 76, 12}, vec2 = {1, 7,… Read More »

Given two vectors, find common elements between these two vectors using STL in C++. Example: Input: vec1 = {1, 45, 54, 71, 76, 12}, vec2… Read More »

Using STL library it is very easy to perform certain basic operations on array like Sorting, searching, sum of elements, finding minimum and maximum element… Read More »

Prerequisite: vector, vector pair sorting Given a vector, keep track of the present indexes corresponding to each element and after sorting print element with its… Read More »

Given an N * N board which is initially empty and a sequence of queries, each query consists of two integers X and Y where… Read More »

Given an array of integers (both odd and even), the task is to arrange them in such a way that odd and even values come… Read More »

Given a Binary Search Tree and a SUM. The task is to check if there exists any triplet(group of 3 elements) in the given BST… Read More »

Given an array of integers arr[] and an integer x, the task is to sort all the elements of the array which are multiples of… Read More »

Given an N-ary tree, print all the levels with odd and even number of nodes in it. Examples: For example consider the following tree 1… Read More »

Given an integer array , the task is to sort only the elements which are perfect squares at their relative positions in the array (positions… Read More »