## Minimum cost to merge numbers from 1 to N

Given an integer N, the task is to find the minimum cost to merge all the numbers from 1 to N where the cost of… Read More »

- Must do Math for Competitive Programming
- Which C++ libraries are useful for competitive programming?
- Breadth First Search without using Queue
- 7 Best Coding Challenge Websites in 2020
- Minimize the maximum difference between adjacent elements in an array
- Which Java libraries are useful for competitive programming?
- Speed up Code executions with help of Pragma in C/C++
- Which Python Modules are useful for competitive programming?
- Setting up a C++ Competitive Programming Environment
- Logarithm tricks for Competitive Programming
- Basic Algorithm Techniques Not Taught in Academics
- Writing code faster during Competitive Programming in C++
- Print all possible combinations of the string by replacing '$' with any other digit from the string
- Count of subarrays of an Array having all unique digits
- Check if sum of Fibonacci elements in an Array is a Fibonacci number or not
- Default values in a Map in C++ STL
- Move all zeroes to end of array using Two-Pointers
- Count the number of ways to construct the target string
- How To Approach A Coding Problem ?
- Sum of GCD of all possible sequences
- Minimize the maximum difference of adjacent elements after at most K insertions
- Kth most frequent Character in a given String
- Count of substrings of length K with exactly K distinct characters
- Maximum LCM among all pairs (i, j) from the given Array
- Count of subarrays which start and end with the same element
- Minimum cost of reducing Array by merging any adjacent elements repetitively
- Finding Median of unsorted Array in linear time using C++ STL
- Important functions of STL Components in C++
- Competitive Programming vs Software Development - Where Should I Invest My Time?
- Shortest path in a directed graph by Dijkstra’s algorithm

Given an integer N, the task is to find the minimum cost to merge all the numbers from 1 to N where the cost of… Read More »

Given a positive number N. The task is to find out the smallest perfect square number A such that N + A is also a… Read More »

Given an array arr[], the task is to check if the minimum element in the array is less than or equal to half of every… Read More »

Competitive Programming (CP) doesn’t typically require to know high-level calculus or some rocket science. But there are some concepts and tricks which are sufficient most… Read More »

Given two strings str1 and str2 containing alpha-numeric characters and a number N. The task is to form a new encrypted string which contains the… Read More »

Given the length of the string l, the length of the substring x and the number of distinct characters that a substring of length x… Read More »

Given an undirected graph with N vertices and M edges, the task is to print all the nodes of the given graph whose degree is… Read More »

Given a starting point with x and y co-ordinates SX and SY respectively, and a sequence ‘D’ denoting the directions to be followed, the task… Read More »

Given a number N, the task is to find the Nth number which has an absolute difference of 1 between every pair of its adjacent… Read More »

Given a binary tree with N nodes numbered [1, N], the task is to find the size of the smallest Dominating set of that tree.… Read More »

Given N blocks out of which K are colored. These K colored blocks are denoted by an array arr[]. The task is to count the… Read More »

Given an array arr of positive integers, the task is to find minimum GCD possible for any pair of the given array. Examples: Input: arr[]… Read More »

Given a positive integer N consisting only two types of digits 6 and 9, the task is to generate the minimum number possible by reversing… Read More »

Given a rooted tree with N nodes, the task is to find the Lowest Common Ancestor for a given set of nodes V of that… Read More »

Given N set of time intervals, the task is to find the intervals which don’t overlap with the given set of intervals. Examples: Input: interval… Read More »