Skip to content

Category Archives: C++

An array in C/C++ or be it in any programming language is a collection of similar data items stored at contiguous memory locations and elements… Read More
This article focuses on function/method overloads by references, as well as the types of arguments that can be passed. Prerequisites: l-value references. r-value references. Move… Read More
Maps are associative containers that store elements in a mapped fashion. Each element has a key value and a mapped value. No two mapped values… Read More
Sets Sets are a type of associative container in which each element has to be unique because the value of the element identifies it. The… Read More
Priority Queues Priority queues are a type of container adapters, specifically designed such that the first element of the queue is the greatest of all… Read More
Lists Lists are sequence containers that allow non-contiguous memory allocation. As compared to vector, the list has slow traversal, but once a position has been… Read More
Priority Queue Priority queues are a type of container adapters, specifically designed such that the first element of the queue is the greatest of all… Read More
Write a function rotate(arr[], d, n) that rotates arr[] of size n by d elements. Example :  Input : arr[] = [1, 2, 3, 4, 5,… Read More
Given an array of distinct integers and a sum value. Find count of triplets with sum smaller than given sum value. The expected Time Complexity… Read More
There are two singly linked lists in a system. By some programming error, the end node of one of the linked lists got linked to… Read More
The moment a beginner hears this word, an image pops up in one’s mind where students are sitting in a room full of Computers and… Read More
Given two numbers represented by two lists, write a function that returns the sum list. The sum list is a list representation of the addition… Read More
Given an array a[0 . . . n-1]. We should be able to efficiently find the GCD from index qs (query start) to qe (query… Read More
Write a program to print all the LEADERS in the array. An element is leader if it is greater than all the elements to its… Read More
Write a function int equilibrium(int[] arr, int n); that given a sequence arr[] of size n, returns an equilibrium index (if any) or -1 if… Read More

Start Your Coding Journey Now!