## Check if a large number is divisible by a number which is a power of 2

Given a large number in the form of a string str and a number K, the task is to check if the number formed by… Read More »

- Minimize the maximum difference between adjacent elements in an array
- Expected Number of Trials to get N Consecutive Heads
- Design a data structure that supports insert, delete, getRandom in O(1) with duplicates
- Shortest Palindromic Substring
- Longest Palindrome in a String formed by concatenating its prefix and suffix
- Generate an array of given size with equal count and sum of odd and even numbers
- Paranthesis Theorem
- XOR of elements in a given range with updates using Fenwick Tree
- Number of ways to place two queens on a N*N chess-board
- Find intersection of intervals given by two lists
- Count of subarrays of size K which is a permutation of numbers from 1 to K
- Find a N-digit number such that it is not divisible by any of its digits
- Find and Count total factors of co-prime A or B in a given range 1 to N
- Number of ways to color N-K blocks using given operation
- Maximum length Subsequence with alternating sign and maximum Sum
- Count of elements which form a loop in an Array according to given constraints
- Difference between NP hard and NP complete problem
- Sum and Product of all even digit sum Nodes of a Singly Linked List
- Nodes with prime degree in an undirected Graph
- Create an array such that XOR of subarrays of length K is X
- Minimum sprinklers required to water a rectangular park
- Count of pairs in a given range with sum of their product and sum equal to their concatenated number
- Group all co-prime numbers from 1 to N
- Check if all nodes of the Binary Tree can be represented as sum of two primes
- C program for Time Complexity plot of Bubble, Insertion and Selection Sort using Gnuplot
- Count of even and odd set bit with array element after XOR with K
- Two player game in which a player can remove all occurrences of a number
- Minimum concatenation required to get strictly LIS for array with repetitive elements | Set-2
- Queries to find frequencies of a string within specified substrings
- Proof that traveling salesman problem is NP Hard

Given a large number in the form of a string str and a number K, the task is to check if the number formed by… Read More »

Given four integers A, N, L and R, the task is to find the N th number in a sequence of consecutive integers from L… Read More »

Given an integer array arr of size N which contains distinct elements from 1 to N. The task is to check if a position in… Read More »

Given a positive integer N, the task is to find the largest integer M such that 0 <= M < N and XOR(M, N) is… Read More »

The price of a stock on each day is given in an array arr[] for N days, the task is to find the maximum profit… Read More »

Given an integer Q representing the number of queries and an array where each query has an integer N. Our task is to iterate through… Read More »

Prerequisite: NP-Completeness, Clique problem. A clique in a graph is a set of vertices where each vertex shares an edge with every other vertex. Thus,… Read More »

Given an arr[] consisting of N elements, the task is to count all subarrays of size K having atleast one pair whose absolute difference is… Read More »

Given an array arr[], we need to find the maximum sum of the even indexed elements that can be obtained by performing right shift operation… Read More »

An algorithm like Insertion Sort can be understood easily by visualizing. In this article, a program that visualizes the Insertion Sort Algorithm has been implemented.… Read More »

Prerequisite: NP-Completeness, Independent set. An Independent Set S of graph G = (V, E) is a set of vertices such that no two vertices in… Read More »

A Min Heap is a Complete Binary Tree in which the children nodes have a higher value (lesser priority) than the parent nodes, i.e., any… Read More »

Given a string str of lowercase English alphabets, our task is to find the frequency of occurrence a subsequence of the string which occurs the… Read More »

Given a string str and an integer K, the task is to find the length of the longest sub-string S such that every character in… Read More »

Given an N-sided regular polygon, we have connected all the vertices at the center of the polygon, thus dividing the polygon into N equal parts.… Read More »