- Reset Accumulator (8085 & 8086 microprocessor)
- Program to print pattern
- Program to print numeric pattern
- Ruby | Decision Making (if, if-else, if-else-if, ternary) | Set - 1
- Ruby | Loops (for, while, do..while, until)
- Apache JMeter - An Introduction
- JavaFX | ColorInput Class
- Java Swing | JToggleButton Class
- JavaFX | ToggleButton Class
- PHP | juliantojd() Function
- PHP | jdtojulian() Function
- PHP | cal_from_jd() Function
- PHP | cal_to_jd() Function
- PHP | date_date_set() Function
- Java Swing | JColorChooser Class
- JavaFX | Slider Class

- Return maximum occurring character in an input string
- Minimum insertions to sort an array
- Majority Element
- Position of rightmost set bit
- Largest Sum Contiguous Subarray
- Merge an array of size n into another array of size m+n
- k largest(or smallest) elements in an array | added Min Heap method
- Program for array rotation
- Write a program to reverse an array or string
- Compute the minimum or maximum of two integers without branching
- Reversal algorithm for array rotation
- Count Inversions in an array | Set 1 (Using Merge Sort)
- Reverse words in a given string
- Sort an array of 0s, 1s and 2s
- Find Union and Intersection of two unsorted arrays
- Find the Minimum length Unsorted Subarray, sorting which makes the complete array sorted
- Program for Fibonacci numbers
- Next higher number with same number of set bits
- Print a given matrix in spiral form
- Check if array elements are consecutive | Added Method 3
- Search in a row wise and column wise sorted matrix
- Count number of occurrences (or frequency) in a sorted array
- Given an array arr[], find the maximum j - i such that arr[j] > arr[i]
- Longest Increasing Subsequence | DP-3
- Find whether an array is subset of another array | Added Method 3
- Smallest of three integers without comparison operators
- A Boolean Matrix Question
- Matrix Chain Multiplication | DP-8
- Count total set bits in all numbers from 1 to n
- Longest Non-palindromic substring
- Coin Change | DP-7
- Interleaving of two given strings with no common characters
- Activity Selection Problem | Greedy Algo-1
- Egg Dropping Puzzle | DP-11
- Longest Palindromic Subsequence | DP-12
- Boyer Moore Algorithm for Pattern Searching
- Find the smallest positive number missing from an unsorted array | Set 1
- Longest Bitonic Subsequence | DP-15
- Find a sorted subsequence of size 3 in linear time
- Palindrome Partitioning | DP-17
- Largest subarray with equal number of 0s and 1s
- Find a pair with the given difference
- XOR of all subarray XORs | Set 2
- Generate integer from 1 to 7 with equal probability
- Find four elements that sum to a given value | Set 1 (n^3 solution)
- Median of two sorted arrays of different sizes
- Lexicographic rank of a string
- Longest Palindromic Substring | Set 2
- Find the number of islands | Set 1 (Using DFS)
- Dijkstra's shortest path algorithm | Greedy Algo-7
- Binary representation of a given number
- Count words in a given string
- Zigzag (or diagonal) traversal of Matrix
- Minimum insertions to form a palindrome | DP-28
- Longest Common Substring | DP-29
- Print all possible combinations of r elements in a given array of size n
- Find the minimum element in a sorted and rotated array
- Print all possible strings of length k that can be formed from a set of n characters
- Longest Arithmetic Progression | DP-35
- Maximum Product Cutting | DP-36
- Move all zeroes to end of array
- Count all possible paths from top left to bottom right of a mXn matrix
- Rearrange an array so that arr[i] becomes arr[arr[i]] with O(1) extra space
- Jump Search
- Remove minimum elements from either side such that 2*min becomes more than max
- Printing Longest Common Subsequence
- Create a matrix with alternating rectangles of O and X
- Count Possible Decodings of a given Digit Sequence
- Sort an array according to the order defined by another array
- Rearrange array in alternating positive & negative items with O(1) extra space | Set 1
- Given an n x n square matrix, find sum of all sub-squares of size k x k
- Mobile Numeric Keypad Problem
- Print all elements in sorted order from row and column wise sorted matrix
- K'th Smallest/Largest Element in Unsorted Array | Set 1
- Longest Even Length Substring such that Sum of First and Second Half is same
- Given a matrix of 'O' and 'X', find the largest subsquare surrounded by 'X'
- Given a binary string, count number of substrings that start and end with 1.
- Check if a given array contains duplicate elements within k distance from each other
- Given a matrix of ‘O’ and ‘X’, replace 'O' with 'X' if surrounded by 'X'
- Find length of period in decimal value of 1/n
- Find a common element in all rows of a given row-wise sorted matrix
- Rearrange an array such that 'arr[j]' becomes 'i' if 'arr[i]' is 'j' | Set 1
- How to print maximum number of A's using given four keys
- Find the longest substring with k unique characters in a given string
- Given a sorted and rotated array, find if there is a pair with a given sum
- Count possible ways to construct buildings
- Count frequencies of all elements in array in O(1) extra space and O(n) time
- Count numbers from 1 to n that have 4 as a digit
- Find minimum number of coins that make a given value
- Generate all possible sorted arrays from alternate elements of two given sorted arrays
- Find a pair with maximum product in array of Integers
- Rotate Matrix Elements
- Transform One String to Another using Minimum Number of Given Operation
- Look-and-Say Sequence
- Total number of non-decreasing numbers with n digits
- Count of n digit numbers whose sum of digits equals to given sum
- Longest Repeating Subsequence
- Count even length binary sequences with same sum of first and second half bits
- Count number of ways to partition a set into k subsets
- Count triplets with sum smaller than a given value
- Count number of ways to divide a number in 4 parts
- Compute nCr % p | Set 2 (Lucas Theorem)
- Find Square Root under Modulo p | Set 1 (When p is in form of 4*i + 3)
- Count Inversions of size three in a given array
- Longest Span with same Sum in two Binary arrays
- Print Concatenation of Zig-Zag String in 'n' Rows
- Merge two sorted arrays with O(1) extra space
- Find the maximum subset XOR of a given set
- Duplicates in an array in O(n) and by using O(1) extra space | Set-2
- Find all divisors of a natural number | Set 2
- Minimize the maximum difference between the heights
- Querying maximum number of divisors that a number in a given range has
- Caesar Cipher in Cryptography
- Find a specific pair in Matrix
- Inplace rotate square matrix by 90 degrees | Set 1
- Return previous element in an expanding matrix
- Rearrange array in alternating positive & negative items with O(1) extra space | Set 2
- Maximum product of a triplet (subsequnece of size 3) in array
- K'th Non-repeating Character
- Longest Common Prefix using Word by Word Matching
- Maximum absolute difference between sum of two contiguous sub-arrays
- Longest Common Increasing Subsequence (LCS + LIS)
- Find number of subarrays with even sum
- LCM of given array elements
- Longest Common Prefix using Character by Character Matching
- No of Factors of n!
- Count number of substrings with exactly k distinct characters
- Rearrange positive and negative numbers with constant extra space
- Dynamic Programming | High-effort vs. Low-effort Tasks Problem
- Find size of the largest '+' formed by all ones in a binary matrix
- Print all n-digit numbers whose sum of digits equals to given sum
- Print all n-digit numbers with absolute difference between sum of even and odd digits is 1
- Find all triplets in a sorted array that forms Geometric Progression
- Minimum Cost To Make Two Strings Identical
- Find k'th character of decrypted string | Set 1
- Find number of times a string occurs as a subsequence in given string
- Third largest element in an array of distinct elements
- A Space Optimized DP solution for 0-1 Knapsack Problem
- Minimum cost to fill given weight in a bag
- Change if all bits can be made same by single flip
- Find minimum elements after considering all possible transformations
- Longest repeating and non-overlapping substring
- Pairs of complete strings in two sets of strings
- Longest common subsequence with permutations allowed
- Sum of all numbers that can be formed with permutations of n digits
- Smallest number divisible by first n numbers
- Check if a string has all characters with same frequency with one variation allowed
- Count All Palindromic Subsequence in a given String
- Recursively break a number in 3 parts to get maximum sum
- Remove minimum number of characters so that two strings become anagram
- Number of flips to make binary string alternate | Set 1
- Smallest Palindrome after replacement
- Number of swaps to sort when only adjacent swapping allowed
- Find maximum difference between nearest left and right smaller elements
- Find pairs with given sum such that elements of pair are in different rows
- Find next Smaller of next Greater in an array
- Find Maximum XOR value of a sub-array of size k
- Count All Palindrome Sub-Strings in a String | Set 1
- Count pairs in an array that hold i*arr[i] > j*arr[j]
- Print matrix in diagonal pattern
- Maximum decimal value path in a binary matrix
- Minimum characters to be added at front to make string palindrome
- Minimum sum of two numbers formed from digits of an array
- Subarrays with distinct elements
- Move all negative elements to end in order with extra space allowed
- Find the highest occurring digit in prime numbers in a range
- XOR counts of 0s and 1s in binary representation
- Minimum cost to sort strings using reversal operations of different costs
- Maximum subarray size, such that all subarrays of that size have sum less than k
- Replace every matrix element with maximum of GCD of row or column
- Minimum sum subsequence such that at least one of every four consecutive elements is picked
- Highest power of 2 less than or equal to given number
- Queries on count of points lie inside a circle
- Find two prime numbers with given sum
- Minimum number of characters to be removed to make a binary string alternate
- Check if a string can be obtained by rotating another string 2 places
- Check if all rows of a matrix are circular rotations of each other
- Compare two integers without using any Comparison operator
- Check length of a string is equal to the number appended at its last
- Ways to write n as sum of two or more positive integers
- LCS (Longest Common Subsequence) of three strings
- Probability of Knight to remain in the chessboard
- Rearrange an array to minimize sum of product of consecutive pair elements
- Find pair with greatest product in array
- Divide array into two sub-arrays such that their averages are equal
- Find elements which are present in first array and not in second
- Sum of matrix in which each element is absolute difference of its row and column numbers
- Make two sets disjoint by removing minimum elements
- Friends Pairing Problem
- Find the missing number in Geometric Progression
- Range Queries for Frequencies of array elements
- Program for FCFS CPU Scheduling | Set 1
- Constant time range add operation on an array
- Check if there exist two elements in an array whose sum is equal to the sum of rest of the array
- Maximum path sum that starting with any cell of 0-th row and ending with any cell of (N-1)-th row
- Minimum operations required to remove an array
- Maximize sum of N X N upper left sub-matrix from given 2N X 2N matrix
- Count of words whose i-th letter is either (i-1)-th, i-th, or (i+1)-th letter of given word
- Print a matrix in alternate manner (left to right then right to left)
- Number of subsequences in a string divisible by n
- Finding the maximum square sub-matrix with all equal elements
- Minimum operations required to set all elements of binary matrix
- Print matrix in antispiral form
- Find floor and ceil in an unsorted array
- Nearest element with at-least one common prime factor
- Subset with no pair sum divisible by K
- Conditionally assign a value without using conditional and arithmetic operators
- Sort all even numbers in ascending order and then sort all odd numbers in descending order
- Recursive Insertion Sort
- Rotate a matrix by 90 degree without using any extra space | Set 2
- Highway Billboard Problem
- Count all perfect divisors of a number
- Sum of two large numbers
- Make n using 1s and 2s with minimum number of terms multiple of k
- Count of strings that can be formed using a, b and c under given constraints
- Maximum consecutive repeating character in string
- Construct an array from XOR of all elements of array except element at same index
- Difference of two large numbers
- Replace all occurrences of string AB with C without using extra space
- Prime points (Points that split a number into two primes)
- Character replacement after removing duplicates from a string
- Lexicographically first palindromic string
- Number of subsequences of the form a^i b^j c^k
- Sum of nodes at k-th level in a tree represented as string
- Find an equal point in a string of brackets
- Count Divisors of n in O(n^1/3)
- Check if frequency of all characters can become same by one removal
- Find the first repeated character in a string
- Largest number smaller than or equal to n and digits in non-decreasing order
- Circular Matrix (Construct a matrix with numbers 1 to m*n in spiral way)
- Largest sum Zigzag sequence in a matrix
- Check if a string follows a^nb^n pattern or not
- Find maximum height pyramid from the given array of objects
- Minimum cost for acquiring all coins with k extra coins allowed with every coin
- Smallest length string with repeated replacement of two distinct adjacent
- Different substrings in a string that start and end with given strings
- Insertion Sort
- Merge Sort
- Bubble Sort
- Program to cyclically rotate an array by one
- Given a number as a string, find the number of contiguous subsequences which recursively add up to 9
- Check if characters of a given string can be rearranged to form a palindrome
- Replace every array element by multiplication of previous and next
- Check if two numbers are equal without using arithmetic and comparison operators
- Minimum number of deletions to make a string palindrome
- Clustering/Partitioning an array such that sum of square differences is minimum
- Binary representation of next number
- Generate k digit numbers with digits in strictly increasing order
- Given a number n, find the first k digits of n^n
- Collect all coins in minimum number of steps
- Minimum steps to delete a string after repeated deletion of palindrome substrings
- Count the number of ways to divide an array into three contiguous parts having equal sum
- Sort an array after applying the given equation
- Count number of ways to jump to reach end
- Largest subset whose all elements are Fibonacci numbers
- K-th Element of Two Sorted Arrays
- Print common characters of two Strings in alphabetical order
- An efficient way to check whether n-th Fibonacci number is multiple of 10
- Print array of strings in sorted order without copying one string into another
- Queries for GCD of all numbers of an array except elements in a given range
- Find the n-th number made of even digits only
- Print all distinct characters of a string in order (3 Methods)
- Minimum number of jumps to reach end | Set 2 (O(n) solution)
- Merge two sorted arrays
- Closest (or Next) smaller and greater numbers with same number of set bits
- Largest sum subarray with at-least k numbers
- Rearrange an array such that every odd indexed element is greater than it previous
- Sum of product of all pairs of array elements
- Print a String in wave pattern
- Find sum of digits in factorial of a number
- Longest Bitonic Subsequence in O(n log n)
- Find Index of 0 to be replaced with 1 to get longest continuous sequence of 1s in a binary array | Set-2
- Numbers whose factorials end with n zeros
- Split numeric, alphabetic and special symbols from a String
- Program to print factors of a number in pairs
- String containing first letter of every word in a given string with spaces
- Count elements less than or equal to a given value in a sorted rotated array
- Longest Common Prefix using Sorting
- Number of integral solutions of the equation x1 + x2 +.... + xN = k
- Maximizing Unique Pairs from two arrays
- Recursive Programs to find Minimum and Maximum elements of array
- Given GCD G and LCM L, find number of possible pairs (a, b)
- Find minimum value to assign all array elements so that array product becomes greater
- Divide large number represented as string
- Count pairs (a, b) whose sum of cubes is N (a^3 + b^3 = N)
- Count pairs from two sorted arrays whose sum is equal to a given value x
- Rearrange a string in sorted order followed by the integer sum
- Painting Fence Algorithm
- Printing Items in 0/1 Knapsack
- Implementing ternary operator without any conditional statement
- Replace every element of the array with BitWise XOR of all other
- Find a pair of elements swapping which makes sum of two arrays same
- Quickly find multiple left rotations of an array | Set 1
- Count number of strings (made of R, G and B) using given combination
- Lexicographically smallest rotated sequence | Set 2
- Count pairs with Odd XOR
- Efficiently check whether n is a multiple of 4 or not
- Queries for decimal values of subarrays of a binary array
- Count of subarrays whose products don't have any repeating prime factor
- Maximum product of subsequence of size k
- Count quadruples from four sorted arrays whose sum is equal to a given value x
- Given a number as a string, find the number of contiguous subsequences which recursively add up to 9 | Set 2
- Check if both halves of the string have same set of characters
- Nth Even length Palindrome
- Quick way to check if all the characters of a string are same
- Program to print solid and hollow rhombus patterns
- Maximum length substring having all same characters after k changes
- Min flips of continuous characters to make all characters same in a string
- Print last k digits of a^b (a raised to power b)
- Shuffle 2n integers in format {a1, b1, a2, b2, a3, b3, ......, an, bn} without using extra space
- String which when repeated exactly K times gives a permutation of S
- Check if array elements are consecutive in O(n) time and O(1) space (Handles Both Positive and negative numbers)
- Number of times a number can be replaced by the sum of its digits until it only contains one digit
- Rotate a Matrix by 180 degree
- Maximize a given unsigned number number by swapping bits at it's extreme positions.
- Find repeated character present first in a string
- Find a string such that every character is lexicographically greater than its immediate next character
- Print a given matrix in zigzag form
- Count of occurrences of a "1(0+)1" pattern in a string
- Sentence Palindrome (Palindrome after removing spaces, dots, .. etc)
- Find maximum number that can be formed using digits of a given number
- Insert minimum number in array so that sum of array becomes prime
- Maximum sum subarray having sum less than or equal to given sum
- Compute average of two numbers without overflow
- Check if a large number can be divided into two or more segments of equal sum
- Smallest number that never becomes negative when processed against array elements
- Maximum sum of lengths of non-overlapping subarrays with k as the max element.
- Print matrix in snake pattern
- Print the longest common substring
- Efficiently find first repeated character in a string without using any additional data structure in one traversal
- Print a matrix in a spiral form starting from a point
- Print characters and their frequencies in order of occurrence
- Minimum Number of Manipulations required to make two Strings Anagram Without Deletion of Character
- Least number of manipulations needed to ensure two strings have identical characters
- Shortest possible combination of two strings
- Count subarrays with equal number of occurrences of two given elements
- Maximise the size of consecutive element subsets in an array
- Longest Common Substring in an Array of Strings
- Sort first half in ascending and second half in descending order | 1
- Length of the smallest sub-string consisting of maximum distinct characters
- Find the n-th number whose binary representation is a palindrome
- Longest subsequence where every character appears at-least k times
- Longest Subarray having sum of elements atmost 'k'
- Count number of paths whose weight is exactly X and has at-least one edge of weight M
- Move all negative numbers to beginning and positive to end with constant extra space
- Find an element in array such that sum of left array is equal to sum of right array
- Maximum sum bitonic subarray
- Check if a number is power of 8 or not
- Sort an array according to absolute difference with a given value "using constant extra space"
- Count all triplets whose sum is equal to a perfect cube
- Positive elements at even and negative at odd positions (Relative order not maintained)
- Lexicographically smallest permutation of {1, .. n} such that no. and position do not match
- Efficiently merging two sorted arrays with O(1) extra space
- Number of substrings with count of each character as k
- Check whether all the bits are unset in the given range or not
- Number of steps required to convert a binary number to one
- Check if it is possible to reach vector B by rotating vector A and adding vector C to it
- Maximum area rectangle by picking four sides from array
- Print all palindromic paths from top left to bottom right in a matrix
- Split the array and add the first part to the end
- Remove array end element to maximize the sum of product
- Value of continuous floor function : F(x) = F(floor(x/2)) + x
- Minimum move to end operations to make all strings equal
- Generate two output strings depending upon occurrence of character in input string.
- Tribonacci Numbers
- Maximum difference between group of k-elements and rest of the array.
- To check whether a large number is divisible by 7
- Make a string from another by deletion and rearrangement of characters
- Maximum Possible Product in Array after performing given Operations
- Count of alphabets having ASCII value less than and greater than k
- Number of closing brackets needed to complete a regular bracket sequence
- Minimum and Maximum sum of absolute differences of pairs
- Check if a string is suffix of another
- Queries to count the number of unordered co-prime pairs from 1 to N
- Rearrange array such that even index elements are smaller and odd index elements are greater
- Longest alternating sub-array starting from every index in a Binary Array
- Longest Repeated Subsequence
- Minimal operations to make a number magical
- Number of positions where a letter can be inserted such that a string becomes palindrome
- Queries on probability of even or odd number in given ranges
- Minimum cost to connect weighted nodes represented as array
- Count numbers in range such that digits in it and it's product with q are unequal
- k size subsets with maximum difference d between max and min
- Shuffle array {a1, a2, .. an, b1, b2, .. bn} as {a1, b1, a2, b2, a3, b3, ……, an, bn} without using extra space
- Program for Mean and median of an unsorted array
- Length of Longest Balanced Subsequence
- Pairs of Positive Negative values in an array
- Pair with maximum GCD from two arrays
- String with k distinct characters and no same characters adjacent
- Print digit's position to be removed to make a number divisible by 6
- Count of strings that can be formed from another string using each character at-most once
- Number of steps to convert to prime factors
- Sum of all the prime divisors of a number
- Program to sort string in descending order
- Lexicographically smallest permutation with distinct elements using minimum replacements
- Count of triangles with total n points with m collinear
- Print words of a string in reverse order
- Smallest subarray with k distinct numbers
- Replace a character c1 with c2 and c2 with c1 in a string S
- Longest subarray not having more than K distinct elements
- Minimum replacements to make elements of a ternary array same
- Given a large number, check if a subsequence of digits is divisible by 8
- Printing string in plus ‘+’ pattern in the matrix
- Check if a large number is divisible by 13 or not
- Find minimum shift for longest common prefix
- Construct lexicographically smallest palindrome
- Program to find the minimum (or maximum) element of an array
- Sums of ASCII values of each word in a sentence
- Count occurrences of a word in string
- K-Primes (Numbers with k prime factors) in a range
- Number of palindromic subsequences of length k where k <= 3
- Probability of choosing a random pair with maximum sum in an array
- Longest Increasing Odd Even Subsequence
- Check whether second string can be formed from characters of first string
- Length of longest increasing circular subarray
- Queries on XOR of XORs of all subarrays
- Maximum sum of pairwise product in an array with negative allowed
- Different ways to sum n using numbers greater than or equal to m
- Maximum product of 4 adjacent elements in matrix
- Maximum product of an increasing subsequence
- Minimum Cost to make two Numeric Strings Identical
- Minimum operations required to make each row and column of matrix equals
- Print given sentence into its equivalent ASCII form
- Longest Common Anagram Subsequence
- Maximum occurring character in an input string | Set-2
- Rearrange array such that arr[i] >= arr[j] if i is even and arr[i]<=arr[j] if i is odd and j < i
- Program to print the pattern ‘D’
- Program to calculate area of a Tetrahedron
- Check if a given string is made up of two alternating characters
- Minimum array element changes to make its elements 1 to N
- Check if both halves of the string have at least one different character
- Reduce Hamming distance by swapping two characters
- Distance between two points travelled by a boat
- Count consonants in a string (Iterative and recursive methods)
- Create a new string by alternately combining the characters of two halves of the string in reverse
- Reversal algorithm for right rotation of an array
- Stable sort for descending order
- Check if it is possible to transform one string to another
- Space efficient iterative method to Fibonacci number
- Maximum distinct lowercase alphabets between two uppercase
- Interchange elements of first and last rows in matrix
- Sort the matrix row-wise and column-wise
- Convert a sentence into its equivalent mobile numeric keypad sequence
- Sum of all subsequences of a number
- Squares of numbers with repeated single digits | Set 1 (3, 6 and 9)
- Sorting rows of matrix in ascending order followed by columns in descending order
- Sorting array with conditional swapping
- Find the slope of the given number
- Check if two strings have a common substring
- Sort 1 to N by swapping adjacent elements
- Maximum of sum and product of digits until number is reduced to a single digit
- Expressing factorial n as sum of consecutive numbers
- Reverse Diagonal elements of matrix
- Maximum Product Subarray | Added negative product case
- Reach A and B by multiplying them with K and K^2 at every step
- Center element of matrix equals sums of half diagonals
- Minimum Sum Path in a Triangle
- Count subarrays with same even and odd elements
- Find duplicates in constant array with elements 0 to N-1 in O(1) space
- Check if characters of one string can be swapped to form other
- Count substrings with each character occurring at most k times
- Number of subarrays having sum less than K
- Check whether a very large number of the given form is a multiple of 3.
- Maximum elements that can be made equal with k updates
- Maximum possible difference of two subsets of an array
- Levelwise Alternating OR and XOR operations in Segment Tree
- Ways to split string such that each partition starts with distinct character
- Check if it possible to partition in k subarrays with equal sum
- Program to find N-th term of the series a, b, b, c, c, c,.......
- Maximum sum of absolute difference of an array
- Median of two sorted arrays with different sizes in O(log(min(n, m)))
- Number of common base strings for two strings
- Print longest palindrome word in a sentence
- Program for scalar multiplication of a matrix
- Maximum sum increasing subsequence from a prefix and a given element after prefix is must
- Count numbers formed by given two digit with sum having given digits
- Two Dimensional Segment Tree | Sub-Matrix Sum
- Sum of bitwise OR of all possible subsets of given set
- Lexicographically smallest string obtained after concatenating array
- Check if a string is substring of another
- Program to print Collatz Sequence
- Program to display all alphabets from A to Z in uppercase and lowercase both
- Program to print all the numbers divisible by 3 and 5 for a given number
- Longest substring having K distinct vowels
- Minimum operations to make GCD of array a multiple of k
- Check if every index i has an index j such that sum of elements in both directions are equal
- Longest substring of 0s in a string formed by k concatenations
- Program to reverse a string (Iterative and Recursive)
- Check for balanced parentheses in an expression | O(1) space
- Triplets in array with absolute difference less than k
- Check if a number can be expressed as a^b | Set 2
- Ways to choose three points with distance between the most distant points <= L
- Sum of product of r and rth Binomial Coefficient (r * nCr)
- Number of digits in N factorial to the power N
- Word Wrap problem ( Space optimized solution )
- Maximum product quadruple (sub-sequence of size 4) in array
- Check whether the number formed by concatenating two numbers is a perfect square or not
- Subsequence of size k with maximum possible GCD
- Longest subarray such that adjacent elements have at least one common digit | Set 1
- Maximum value in a matrix which contain intersecting concentric submatrix
- In-Place Algorithm
- Highest power of two that divides a given number
- Minimum splits in a binary string such that every substring is a power of 4 or 6.
- Longest Decreasing Subsequence
- Queries for number of array elements in a range with Kth Bit Set
- Recursive program to generate power set
- Number which has the maximum number of distinct prime factors in the range M to N
- Find the smallest positive number missing from an unsorted array | Set 2
- Maximum Product Subarray | Set 3
- Find longest length number in a string
- Puzzle | Minimum distance for Lizard
- Find Largest Special Prime which is less than or equal to a given number
- Maximize the number of segments of length p, q and r
- Degree of a Cycle Graph
- kth smallest/largest in a small range unsorted array
- Memoization (1D, 2D and 3D)
- Minimum positive integer required to split the array equally
- Find i’th index character in a binary string obtained after n iterations | Set 2
- Previous greater element
- Permutation of a string with maximum number of characters greater than its adjacent characters
- Replace every element with the greatest element on its left side
- Sum of array elements excluding the elements which lie between a and b
- Spiral Pattern
- Longest Common Prefix Matching | Set-6
- Print all prime numbers less than or equal to N
- Number of Counterclockwise shifts to make a string palindrome
- Replace every character of string by character whose ASCII value is K times more than it
- Longest Common Subsequence | DP using Memoization
- Edit distance and LCS (Longest Common Subsequence)
- Find index of first occurrence when an unsorted array is sorted
- Sudo Placement[1.5] | Second Smallest in Range
- Program to find equation of a plane passing through 3 points
- Check if it is possible to create a polygon with a given angle
- Distance between a point and a Plane in 3 D
- Haversine formula to find distance between two points on a sphere
- Program to print numeric pattern | Set - 2
- Angle between two Planes in 3D
- Average of ASCII values of characters of a given string
- Minimum cost to reach the top of the floor by climbing stairs
- Sum of all prime divisors of all the numbers in range L-R
- Print the corner elements and their sum in a 2-D matrix
- Sort first half in ascending and second half in descending order | Set 2
- Number of subarrays having sum in a given range
- Lexicographically middle string
- Distance between two parallel Planes in 3-D
- Number of sub arrays with odd sum
- Longest Subarray with first element greater than or equal to Last element
- Remove all occurrences of a character in a string
- Segregating negative and positive maintaining order and O(1) space
- Find gcd(a^n, c) where a, n and c can vary from 1 to 10^9
- Matrix sum except one item
- Maximum sum in circular array such that no two elements are adjacent
- Program to find last two digits of 2^n
- Number of ways to represent a number as sum of k fibonacci numbers
- Check if bits in range L to R of two numbers are complement of each other or not
- Probability of a key K present in array
- Surd number
- Count pairs with Bitwise OR as Even number
- Check if a Matrix is Invertible
- Inserting M into N such that m starts at bit j and ends at bit i | Set-2
- Minimize the difference between minimum and maximum elements
- Convert time from 24 hour clock to 12 hour clock format
- First element greater than or equal to X in prefix sum of N numbers using Binary Lifting
- Check if a key is present in every segment of size k in an array
- Number of integral solutions for equation x = b*(sumofdigits(x)^a)+c
- Intersecting rectangle when bottom-left and top-right corners of two rectangles are given
- Check if a point lies on or inside a rectangle | Set-2
- Check if max occurring character of one string appears same no. of times in other
- Longest subarray such that the difference of max and min is at-most one
- Even digits Sum and Odd digits sum divisible by 4 and 3 respectively
- Program to Print the Trapezium Pattern
- Cut all the rods with some length such that the sum of cut-off length is maximized
- Number of possible pairs of Hypotenuse and Area to form right angled triangle
- Print the last occurrence of elements in array in relative order
- Subtraction of two numbers using 2's Complement
- Count strings with consonants and vowels at alternate position
- Maximum number of dots after throwing a dice N times
- Number of chocolates left after k iterations
- Program to find Nth term in the series 0, 0, 2, 1, 4, 2, 6, 3, 8,...
- Check if the characters in a string form a Palindrome in O(1) extra space
- Minimum number of changes required to make the given array an AP
- Alternate Primes till N
- Count numbers which can be represented as sum of same parity primes
- Program for incrementing/decrementing triangle pattern
- Maximum set bit sum in array without considering adjacent elements
- Longest subarray having average greater than or equal to x | Set-2
- Find the largest number that can be formed with the given digits
- N-th term in the series 1, 11, 55, 239, 991,....
- Elements that occurred only once in the array
- Count elements in the given range which have maximum number of divisors
- Balanced expressions such that given positions have opening brackets | Set 2
- Minimum element in a max heap
- Count number of triplets with product equal to given number | Set 2
- Rotate a matrix by 90 degree in clockwise direction without using any extra space
- Fascinating Number
- Numbers with sum of digits equal to the sum of digits of its all prime factor
- Program to find Nth term in the series 0, 2, 1, 3, 1, 5, 2, 7, 3,…
- Ways to place K bishops on an N×N chessboard so that no two attack
- Check if Decimal representation of an Octal number is divisible by 7
- Median of two sorted arrays of different sizes | Set 1 (Linear)
- Sort first k values in ascending order and remaining n-k values in descending order
- Minimum number of square tiles required to fill the rectangular floor
- Maximize the profit by selling at-most M products
- Program to check if an array is bitonic or not
- Find Nth term of series 1, 4, 15, 72, 420...
- Program to check whether 4 points in a 3-D plane are Coplanar
- Count number of triplets with product equal to given number with duplicates allowed
- Find Nth term of the series 5, 13, 25, 41, 61...
- Check whether a given point lies on or inside the rectangle | Set 3
- Program to find the Nth term of series 5, 10, 17, 26, 37, 50, 65, 82, ...
- Program to find the Nth term of series 0, 4, 14, 30, 51, 80, 114, 154, 200, ...
- Number of divisors of a given number N which are divisible by K
- Number of substrings of one string present in other
- Length of longest common subsequence containing vowels
- Program to count number of distinct Squares and Cubes upto N
- Coin game of two corners (Greedy Approach)
- Distinct Prime Factors of Array Product
- Check if a number with even number of digits is palindrome or not
- Find area of parallelogram if vectors of two adjacent sides are given
- Print elements that can be added to form a given sum
- Program to find the Nth term of the series 0, 5, 14, 27, 44, ........
- Calculate the total fine to be collected
- Find Nth term of the series 1, 8, 54, 384...
- Find Nth term of the series 1, 1, 2, 6, 24...
- Check if subarray with given product exists in an array
- Replace every element of the array by sum of all other elements
- Program to calculate Profit Or Loss
- Sum of Area of all possible square inside a rectangle
- Check if a String can be converted to Pangram in K changes
- Check if a number is divisible by 23 or not
- Check if a number is divisible by 41 or not
- Find the maximum sum of Plus shape pattern in a 2-D array
- Maximum number of pieces in N cuts
- Program to find Sum of the series 1*3 + 3*5 + ....
- For each element in 1st array count elements less than or equal to it in 2nd array | Set 2
- Program to find Length of Bridge using Speed and Length of Train
- Find four factors of N with maximum product and sum equal to N
- Minimum number of elements to be removed to make XOR maximum
- Smallest square formed with given rectangles
- Minimum squares to cover a rectangle
- Check if the given chessboard is valid or not
- Check if any large number is divisible by 17 or not
- Program to find the head start in a race
- Minimum length of the shortest path of a triangle
- Sum of Factors of a Number using Prime Factorization
- Largest rectangle that can be inscribed in a semicircle
- The biggest possible circle that can be inscribed in a rectangle
- Maximum occurred integer in n ranges | Set-2
- Queries to check if it is possible to join boxes in a circle
- Find a point such that sum of the Manhattan distances is minimized
- Area of circle inscribed within rhombus
- Program to calculate Root Mean Square
- Find the sum of series 0.X + 0.XX + 0.XXX +... upto k terms
- Program to find the quantity after mixture replacement
- Area of a largest square fit in a right angle triangle
- Longest Subarray with Sum greater than Equal to Zero
- Minimum Players required to win the game
- Program to find total number of edges in a Complete Graph
- Find bitwise AND (&) of all possible sub-arrays
- Minimum changes required to make two arrays identical
- Find bitwise OR of all possible sub-arrays
- Product of 2 numbers using recursion | Set 2
- Largest triangle that can be inscribed in a semicircle
- Find the sum of the series 2, 5, 13, 35, 97...
- Find maximum points which can be obtained by deleting elements from array
- Largest square that can be inscribed in a semicircle
- Length of longest rod that can fit into a cuboid
- Largest trapezoid that can be inscribed in a semicircle
- Count common subsequence in two strings
- Perfect cube greater than a given number
- Count pairs (a, b) whose sum of squares is N (a^2 + b^2 = N)
- Count the number of ways to traverse a Matrix
- Check if lowercase and uppercase characters are in same order
- Largest triangle that can be inscribed in an ellipse
- Program to print elements of a Matrix row-wise skipping alternate elements
- Program to find the Volume of an irregular tetrahedron
- Divide a number into two parts such that sum of digits is maximum
- Find sum of product of number in given series
- Find area of triangle if two vectors of two adjacent sides are given
- Find the sum of the series x(x+y) + x^2(x^2+y^2) +x^3(x^3+y^3)+ ... + x^n(x^n+y^n)
- Program to find Nth term of the series 2, 4, 3, 4, 15...
- Ratio of mth and nth term in an Arithmetic Progression (AP)
- Program to find the Hidden Number
- Find other two sides and angles of a right angle triangle
- Replace every character of a string by a different character
- Program to find Circuit Rank of an Undirected Graph
- Check if two arrays are permutations of each other using Mathematical Operation
- Check if a point is inside, outside or on the ellipse
- Program to find the product of ASCII values of characters in a string
- Program to find the value of tan(nΘ)
- Program to find N-th term of series 3, 5, 33, 35, 53....
- Program to find the value of sin(nΘ)
- First triangular number whose number of divisors exceeds N
- Count number of integers less than or equal to N which has exactly 9 divisors
- Find an element in an array such that elements form a strictly decreasing and increasing sequence
- Find the count of maximum contiguous Even numbers
- Minimum cost to buy N kilograms of sweet for M persons
- Program to find the N-th term of series 3, 5, 33, 35, 53…. | Set-2
- Maximum Sum of Products of Two Arrays
- Minimum odd cost path in a matrix
- Set the rightmost off bit
- Generating numbers that are divisor of their right-rotations
- Program to find the Centroid of the triangle
- Number of Co-prime pairs from 1 to N with product equals to N
- Sum of the first N terms of the series 5,12, 23, 38....
- Find the GCD of N Fibonacci Numbers with given Indices
- Number of unique permutations starting with 1 of a Binary String
- Program to print the series 2, 1, 4, 3, 6, 5, .... up to N terms
- Numbers less than N which are product of exactly two distinct prime numbers
- Total number of different staircase that can made from N boxes
- Ways to write N as sum of two or more positive integers | Set-2
- Count the number of carry operations required to add two numbers
- Number of values of b such that a = b + (a^b)
- Minimum increment in the sides required to get non-negative area of a triangle
- Find two distinct prime numbers with given product
- Find the altitude and area of an isosceles triangle
- Program to find the surface area of the square pyramid
- Program to find Nth term of series 0, 7, 18, 33, 51, 75, 102, 133, .....
- Program to find Nth term of series 0, 10, 30, 60, 99, 150, 210, 280...........
- Program to find Nth term of series 2, 12, 28, 50, 77, 112, 152, 198, .....
- Program to find Nth term of series 4, 14, 28, 46, 68, 94, 124, 158, .....
- Program to find Nth term of series 0, 9, 22, 39, 60, 85, 114, 147, .....
- Program to find Nth term of series 1, 6, 17, 34, 56, 86, 121, 162, .......
- Program to find Nth term of series 3, 12, 29, 54, 86, 128, 177, 234, .....
- Program to check if an array is palindrome or not using Recursion
- Program to find the common ratio of three numbers
- Program to calculate the value of nCr Efficiently
- Find the direction from given string
- Program to find remainder when large number is divided by r
- Check if an array is Wave Array
- Number of balanced bracket subsequence of length 2 and 4
- Replace minimal number of characters to make all characters pair wise distinct
- Count Numbers with N digits which consists of odd number of 0's
- Rearrange the string to maximize the number of palindromic substrings
- Number of solutions of n = x + n ⊕ x
- Find pair with maximum difference in any column of a Matrix
- Absolute difference between sum and product of roots of a quartic equation
- Find the largest good number in the divisors of given number N
- Sum of first N natural numbers by taking powers of 2 as negative number
- Check if it is possible to move from (a, 0) to (b, 0) with given jumps
- Count all the numbers less than 10^6 whose minimum prime factor is N
- Product of all primes in the range from L to R
- Check whether bitwise AND of a number with any subset of an array is zero or not
- Check if it is possible to sort the array after rotating it
- Program to find the Nth number of the series 2, 10, 24, 44, 70.....
- Construct a frequency array of digits of the values obtained from x^1, x^2, ........, x^n
- Find N digits number which is divisible by D
- Maximum removal from array when removal time >= waiting time
- Find the value of max(f(x)) - min(f(x)) for a given F(x)
- Sum of alternate elements of a N x N matrix
- Meta Binary Search | One-Sided Binary Search
- Program to print the Cot Bed Pattern
- Number of ways to choose a pair containing an even and an odd number from 1 to N
- Check if a cell can be visited more than once in a String
- Find the number of rectangles of size 2*1 which can be placed inside a rectangle of size n*m
- Find Sum of pair from two arrays with maximum sum
- Sum of all the prime numbers in a given range
- Product of all the elements in an array divisible by a given number K
- Check if a string can be rearranged to form special palindrome
- Program to find the maximum element in a Matrix
- Check whether the given number is Euclid Number or not
- Minimum number of digits to be removed so that no two consecutive digits are same
- Generate a number such that the frequency of each digit is digit times the frequency in given number
- Smallest Integer to be inserted to have equal sums
- Find the unit place digit of sum of N factorials
- Count all the numbers in a range with smallest factor as K
- Program to print the pattern with two hollow Triangles
- Count pairs (i,j) such that (i+j) is divisible by A and B both
- Longest Subsequence with at least one common digit in every element
- Value of the series (1^3 + 2^3 + 3^3 + ... + n^3) mod 4 for a given n
- Pair with given sum in matrix
- Check if a pair with given product exists in a Matrix
- Minimum increment operations to make the array in increasing order
- Check if a large number is divisible by 2, 3 and 5 or not
- Sum of squares of Fibonacci numbers
- Find last two digits of sum of N factorials
- Sum of Fibonacci Numbers with alternate negatives
- Program to print Hut Star pattern
- Numbers in range [L, R] such that the count of their divisors is both even and prime
- Difference between the largest and the smallest primes in an array
- Find Sum of Series 1^2 - 2^2 + 3^2 - 4^2 ..... upto n terms
- Product of all pairwise consecutive elements in an Array
- Minimum number of segments required such that each segment has distinct elements
- Number of distinct integers obtained by lcm(X, N)/X
- Minimum number of Parentheses to be added to make it valid
- Print values of 'a' in equation (a+b) <= n and a+b is divisible by x
- Number of groups of magnets formed from N magnets
- Sum and Product of minimum and maximum element of an Array
- Find Tangent at a given point on the curve
- Check whether a binary string can be formed by concatenating given N numbers sequentially
- Minimum number of towers required such that every house is in the range of at least one tower
- Find the longest common prefix between two strings after performing swaps on second string
- Number of permutations of a string in which all the occurrences of a given character occurs together
- Number of squares of side length required to cover an N*M rectangle
- Check if the characters of a given string are in alphabetical order
- Largest element in the array that is repeated exactly k times
- Program to find the Sum of each Row and each Column of a Matrix
- Sub-strings of length K containing same character
- K- Fibonacci series
- Find if a molecule can be formed from 3 atoms using their valence numbers
- Count numbers whose XOR with N is equal to OR with N
- Minimum and Maximum element of an array which is divisible by a given number k
- Minimum time to reach a point with +t and -t moves at time t
- Number of anomalies in an array
- Check if all the palindromic sub-strings are of odd length
- N-th character in the string made by concatenating natural numbers
- Lexicographically largest string formed from the characters in range L and R
- Print array elements in alternatively increasing and decreasing order
- Replace repeating elements with greater that greatest values
- Remove characters that appear more than k times
- Largest factor of a given number which is a perfect square
- Remove characters from string that appears strictly less than K times
- Check if any permutation of N equals any power of K
- Check if it is possible to rearrange a binary string with alternate 0s and 1s
- Minimum squares to evenly cut a rectangle
- Replace duplicates with greater than previous duplicate value
- Program to find count of numbers having odd number of divisors in given range
- Find the foot of perpendicular of a point in a 3 D plane
- Check if a number is a Mystery Number
- Replace every element of the array by product of all other elements
- Replace every array element by sum of previous and next
- Find time taken for signal to reach all positions in a string
- Maximum points of intersection n lines
- Sum of width (max and min diff) of all Subsequences
- Problem of 8 Neighbours of an element in a 2-D Matrix
- Convert all lowercase characters to uppercase whose ASCII value is co-prime with k
- Find maximum value of x such that n! % (k^x) = 0
- Product of every K’th prime number in an array
- Number of ways to partition a string into two balanced subsequences
- Check whether sum of digits at odd places of a number is divisible by K
- Lexicographically smallest string formed by removing at most one character
- Check whether it is possible to make both arrays equal by modifying a single element
- Minimum number of operations required to reduce N to 1
- Find single Movement in a Matrix
- Absolute Difference of all pairwise consecutive elements in an array
- Number of triangles formed from a set of points on three lines
- Minimum number of operations required to delete all elements of the array
- Replace every array element by Bitwise Xor of previous and next element
- Longest subarray with elements having equal modulo K
- N digit numbers divisible by 5 formed from the M digits
- Replace every element with the smallest element on its left side
- Number of cells in the right and left diagonals passing through (x, y) in a matrix
- Minimum steps to remove substring 010 from a binary string
- Check whether (i,j) exists such that arr[i] != arr[j] and arr[arr[i]] is equal to arr[arr[j]]
- Count number less than N which are product of perfect squares
- Check if the Xor of the frequency of all digits of a number N is zero or not
- Lexicographically smallest permutation with no digits at Original Index
- Smallest odd digits number not less than N
- Count and Print the alphabets having ASCII value in the range [l, r]
- Count the number of vowels occurring in all the substrings of given string
- Check if any permutation of a number is divisible by 3 and is Palindromic
- Maximum sum and product of the M consecutive digits in a number
- Find the count of palindromic sub-string of a string in its sorted form
- Index with Minimum sum of prefix and suffix sums in an Array
- Partition an array such into maximum increasing segments
- Find if array has an element whose value is half of array sum
- GCD of a number raised to some power and another number
- Minimum cuts required to divide the Circle into equal parts
- Find the count of Strictly decreasing Subarrays
- Count and Print the alphabets having ASCII value not in the range [l, r]
- Count the number of words having sum of ASCII values less than and greater than k
- Print each word in a sentence with their corresponding average of ASCII values
- Check whether product of digits at even places is divisible by sum of digits at odd place of a number
- Find the count of substrings in alphabetic order
- Minimum number of cuts required to make circle segments equal sized
- Minimum deletions from string to reduce it to string with at most 2 unique characters
- Game of stones
- Find the value of f(n) / f(r) * f(n-r)
- Probability of getting two consecutive heads after choosing a random coin among two different types of coins
- Find the index of the left pointer after possible moves in the array
- Check if a prime number can be expressed as sum of two Prime Numbers
- Print a case where the given sorting algorithm fails
- Largest cone that can be inscribed within a cube
- Minimum number of characters to be replaced to make a given string Palindrome
- Check if the array has an element which is equal to product of remaining elements
- Total number of subsets in which the product of the elements is even
- Minimum cost to cover the given positions in a N*M grid
- Minimum steps to convert one binary string to other only using negation
- Largest perfect cube number in an Array
- Minimum element of each row and each column in a matrix
- Product of middle row and column in an odd square matrix
- Program to convert the diagonal elements of the matrix to 0
- Sorting rows of matrix in descending order followed by columns in ascending order
- Count number of triplets (a, b, c) such that a^2 + b^2 = c^2 and 1 <= a <= b <= c <= n
- Minimum sum of the elements of an array after subtracting smaller elements from larger
- Count number of indices such that s[i] = s[i+1] : Range queries
- Number of moves required to guess a permutation.
- Minimum elements to change so that for an index i all elements on the left are -ve and all elements on the right are +ve
- Find Bit whose minimum sequence flips makes all bits same
- Program to find first N Iccanobif Numbers
- Frequency of each element of an array of small ranged values
- Print numbers with digits 0 and 1 only such that their sum is N
- Size of the smallest subset with maximum Bitwise OR
- Find number of substrings of length k whose sum of ASCII value of characters is divisible by k
- Time taken by two persons to meet on a circular track
- Replace every element of the array by its next element
- Replace the middle element of matrix with sum of surrounding elements
- Expressing a fraction as a natural number under modulo 'm'
- Number of balanced bracket expressions that can be formed from a string
- Check If every group of a's is followed by a group of b's of same length
- Rearrange all elements of array which are multiples of x in decreasing order
- Sum of first N natural numbers which are divisible by X or Y
- Larger of a^b or b^a (a raised to power b or b raised to power a)
- Find the element whose multiplication with -1 makes array sum 0
- Reverse middle words of a string
- Puzzle | 1000 light bulbs switched on/off by 1000 persons passing by
- Reduce the array to a single element with the given operation
- Check if the given decimal number has 0 and 1 digits only
- Largest Divisor of a Number not divisible by a perfect square
- Count all sub-sequences having product <= K - Recursive approach
- Check if the sum of perfect squares in an array is divisible by x
- Permutations of string such that no two vowels are adjacent
- Concatenate suffixes of a String
- Minimum removals in a number to be divisible by 10 power raised to K
- Split a number into 3 parts such that none of the parts is divisible by 3
- Minimum Distance Between Words of a String
- Binary Search a String
- Count numbers upto N which are both perfect square and perfect cube
- Lower Insertion Point
- Minimum value that divides one number and divisible by other
- Ways to fill N positions using M colors such that there are exactly K pairs of adjacent different colors
- Find minimum x such that (x % k) * (x / k) == n | Set-2
- Minimum number of operations required to sum to binary string S
- Sub-strings that start and end with one character and have at least one other
- Maximum number of removals of given subsequence from a string
- Biggest Reuleaux Triangle within A Square
- Count pairs in an array that hold i+j= arr[i]+arr[j]
- Pairs from an array that satisfy the given condition
- Largest hexagon that can be inscribed within an equilateral triangle
- Recursive program to insert a star between pair of identical characters
- Remove consecutive alphabets which are in same case
- Check if N is a Factorial Prime
- Area of a n-sided regular polygon with given Radius
- Recursive Program for Binary to Decimal
- Generate number with given operation and check if it is palindrome
- Choose n elements such that their mean is maximum
- Minimum absolute difference between N and a power of 2
- Maximum value of arr[i] % arr[j] for a given array
- Count rows in a matrix that consist of same element
- Check if it is possible to draw a straight line with the given direction cosines
- First and Last Three Bits
- Maximum length subarray with LCM equal to product
- Find probability of selecting element from kth column after N iterations
- Find nth term of the series 5 2 13 41
- Print n 0s and m 1s such that no two 0s and no three 1s are together
- Biggest Reuleaux Triangle within a Square which is inscribed within a Circle
- Print all safe primes below N
- Check if it is possible to get back to 12'0 clock only by adding or subtracting given seconds
- Rectangle with minimum possible difference between the length and the width
- Count of values of x <= n for which (n XOR x) = (n - x)
- Find the resulting Colour Combination
- Check if a binary string has two consecutive occurrences of one everywhere
- Generate a random permutation of 1 to N
- Check if possible to shuffle a matrix with adjacent movements
- Count number of trailing zeros in (1^1)*(2^2)*(3^3)*(4^4)*..
- Check if a + b = c is valid after removing all zeroes from a, b and c
- Decrypt a string encrypted by repeating i-th character i times
- Arrange first N natural numbers such that absolute difference between all adjacent elements > 1
- Increasing sequence with given GCD
- Program to find LCM of two Fibonnaci Numbers
- Maximum subarray sum in array formed by repeating the given array k times
- Number of Simple Graph with N Vertices and M Edges
- Check if a binary string contains consecutive same or not
- Count Odd and Even numbers in a range from L to R
- Generate minimum sum sequence of integers with even elements greater
- Split the array into equal sum parts according to given conditions
- Modify the string by swapping continuous vowels or consonants
- Program to Assign grades to a student using Nested If Else
- Sub-string that contains all lowercase alphabets after performing the given operation
- Minimum spanning tree cost of given Graphs
- Total position where king can reach on a chessboard in exactly M moves
- Minimum number of operations to move all uppercase characters before all lower case characters
- Choose points from two ranges such that no point lies in both the ranges
- Count the number of rhombi possible inside a rectangle of given size
- Minimum number of given operations required to convert a string to another string
- Program for power of a complex number in O(log n)
- Generate a string consisting of characters 'a' and 'b' that satisfy the given conditions
- Minimize the sum of squares of sum of N/2 paired formed by N numbers
- Count of pairs (x, y) in an array such that x < y
- Find a permutation of 2N numbers such that the result of given expression is exactly 2K
- Maximum length subarray with difference between adjacent elements as either 0 or 1
- Longest subsequence such that adjacent elements have at least one common digit
- Numbers in a Range with given Digital Root
- Count Hexadecimal Number
- Minimize sum of adjacent difference with removal of one element from array
- Group consecutive characters of same type in a string
- Deletions of "01" or "10" in binary string to make it free from "01" or "10"
- Minimum length substring with exactly K distinct characters
- Find the first maximum length even word from a string
- Sum of (maximum element - minimum element) for all the subsets of an array.
- Number of pairs from the first N natural numbers whose sum is divisible by K
- Number of ways to make binary string of length N such that 0s always occur together in groups of size K
- Count sub-arrays whose product is divisible by k
- Count of buttons pressed in a keypad mobile
- Find a distinct pair (x, y) in given range such that x divides y
- Find the number of binary strings of length N with at least 3 consecutive 1s
- Find the number of integers x in range (1,N) for which x and x+1 have same number of divisors
- Program to print an array in Pendulum Arrangement with constant space
- Program to find the rate percentage from compound interest of consecutive years
- Count the number of primes in the prefix sum array of the given array
- Maximum sum such that no two elements are adjacent | Set 2
- Minimum number of sub-strings of a string such that all are power of 5
- Bitwise AND of sub-array closest to K
- Number of edges in mirror image of Complete binary tree
- Sum of GCDs of each row of the given matrix
- Minimum number of operations on a binary string such that it gives 10^A as remainder when divided by 10^B
- Queries for bitwise OR in the index range [L, R] of the given array
- Find the time which is palindromic and comes after the given time
- Check if a string contains two non overlapping sub-strings "geek" and "keeg"
- Print an N x M matrix such that each row and column has all the vowels in it
- Check whether an array can be made strictly increasing by modifying atmost one element
- Count of all possible values of X such that A % X = B
- Count the triplets such that A[i] < B[j] < C[k]
- Distance of chord from center when distance between center and another equal length chord is given
- Angle subtended by the chord to center of the circle when the angle subtended by the another equal chord of a congruent circle is given
- Find the number of Chicks in a Zoo at Nth day