Tag Archives: cpp-vector

Given an array arr[] consisting of N integers and an integer X, the task is to perform integer division on the array elements by X… Read More
Given two integers N and K, the task is to find whether it is possible to represent N as the sum of exactly K powers… Read More
Given a positive integer N, the task is to find the count of all the numbers M such that when the number N is divided… Read More
Given two arrays A[ ] and B[ ] consisting of N integers, where Ai denotes the quantity of sweets of the ith type and Bi… Read More
Given an array arr[] consisitng of N integers and an integer K, the task is to find the Kth smallest element in the array using… Read More
Given a 2D array ranges[][] of size N * 2, with each row representing a range of the form [L, R], the task is to… Read More
Given two strings A and B of length N and M respectively, the task is to find the minimum cost to convert string A to… Read More
Vectors are dynamic arrays with the ability to resize itself automatically when an element is inserted or deleted, with their storage being handled automatically by… Read More
Vectors: Vectors are containers similar to dynamic arrays with the ability to resize when a new element is inserted or deleted from it. It is… Read More
Map in STL: Maps are associative containers that store elements in a mapped fashion. Each element has a key value and a mapped value. No… Read More
Given an integer N which needs to be present as a value in a node in the last level of a Tree rooted at 1… Read More
Given two arrays arr[] and min[] consisting of N integers and an integer K. For each index i, arr[i] can be reduced to at most… Read More
Given a Binary Tree, the task is to print the middle nodes of each level of a binary tree. Considering M to be the number… Read More
Given a string S containing lowercase English alphabets of length N and an integer K such that K ≤ N. The task is to find… 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