- Count trailing zero bits using lookup table
- How to Get the names of the table in SQL
- SQL Server Identity
- SQL SERVER | Conditional Statements
- SQL Server Mathematical functions (SQRT, PI, SQUARE, ROUND, CEILING & FLOOR)
- SQL Server | STUFF() Function
- SQL Server | SERVERPROPERTY()
- Mean and Mode in SQL Server
- Allow only alphabets in column in SQL Server
- C# Decision Making (if, if-else, if-else-if ladder, nested if, switch, nested switch)
- Loops in C#
- Introduction to Microsoft Azure | A cloud computing service
- Program to convert Byte array to IP Address
- SQL SERVER | IN Condition

- Print all the duplicates in the input string
- Program to find whether a no is power of two
- Ugly Numbers
- Minimum number of jumps to reach end
- Count set bits in an integer
- Given a string, find its first non-repeating character
- Write a program to reverse an array or string
- Count Inversions in an array | Set 1 (Using Merge Sort)
- Two elements whose sum is closest to zero
- Maximum difference between two elements such that larger element appears after the smaller number
- Cutting a Rod | DP-13
- Next Greater Element
- Find duplicates in O(n) time and O(1) extra space | Set 1
- Naive algorithm for Pattern Searching
- 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]
- Find whether an array is subset of another array | Added Method 3
- Find the minimum distance between two numbers
- Smallest of three integers without comparison operators
- Min Cost Path | DP-6
- Find a Fixed Point (Value equal to index) in a given array
- Count smaller elements on right side
- Coin Change | DP-7
- 0-1 Knapsack Problem | DP-10
- Egg Dropping Puzzle | DP-11
- Maximum Sum Increasing Subsequence | DP-14
- Chinese Remainder Theorem | Set 1 (Introduction)
- Shuffle a given array using Fisher–Yates shuffle Algorithm
- The Stock Span Problem
- Minimum insertions to form a palindrome | DP-28
- Unbounded Binary Search Example (Find the point where a monotonically increasing function becomes positive first time)
- Find if there is a subarray with 0 sum
- Printing Longest Common Subsequence
- Create a matrix with alternating rectangles of O and X
- Rearrange array in alternating positive & negative items with O(1) extra space | Set 1
- Find the smallest positive integer value that cannot be represented as sum of any subset of a given array
- Find common elements in three sorted arrays
- Given an n x n square matrix, find sum of all sub-squares of size k x k
- Find n'th number in a number system with only 3 and 4
- Length of the largest subarray with contiguous elements | Set 1
- Length of the largest subarray with contiguous elements | Set 2
- Find minimum time to finish all jobs with given constraints
- Count Distinct Non-Negative Integer Pairs (x, y) that Satisfy the Inequality x*x + y*y < n
- Find if a given string can be represented from a substring by iterating the substring “n” times
- Find a common element in all rows of a given row-wise sorted matrix
- Count number of islands where every island is row-wise and column-wise separated
- Find the minimum cost to reach destination using a train
- How to print maximum number of A's using given four keys
- Calculate square of a number without using *, / and pow()
- Check if a given sequence of moves for a robot is circular or not
- Calculate 7n/8 without using division and multiplication operators
- Legendre's formula (Given p and n, find the largest x such that p^x divides n!)
- Euler's Totient Function
- Count numbers from 1 to n that have 4 as a digit
- Shortest Common Supersequence
- Find nth Magic Number
- Minimum steps to reach a destination
- Find the odd appearing element in O(Log n) time
- Search an element in an array where difference between adjacent elements is 1
- Count factorial numbers in a given range
- Total number of non-decreasing numbers with n digits
- Check if a given number is sparse or not
- Find maximum of minimum for every window size in a given array
- Maximum weight transformation of a given string
- Check if two given strings are isomorphic to each other
- Count number of ways to cover a distance
- Find the maximum subarray XOR in a given array
- Euler's Totient function for all numbers smaller than or equal to n
- Check if edit distance between two strings is one
- Euler's criterion (Check if square root under modulo p exists)
- Program for Method Of False Position
- Count Fibonacci numbers in given range in O(Log n) time and O(1) space
- Find smallest values of x and y such that ax - by = 0
- Find the maximum subset XOR of a given set
- Check if count of divisors is even or odd
- Rearrange an array in maximum minimum form | Set 1
- Submatrix Sum Queries
- Runge-Kutta 4th Order Method to Solve Differential Equation
- Subarray/Substring vs Subsequence and Programs to Generate them
- Count numbers having 0 as a digit
- Frobenius coin problem
- Comb Sort
- Pigeonhole Sort
- Number of perfect squares between two given numbers
- Count number of ways to fill a "n x 4" grid using "1 x 4" tiles
- Count positive integers with 0 as a digit and maximum 'd' digits
- Count Negative Numbers in a Column-Wise and Row-Wise Sorted Matrix
- Check perfect square using addition/subtraction
- Check if a number is a power of another number
- Fifth root of a number
- Minimum number of palindromic subsequences to be removed to empty a binary string
- Odd-Even Sort / Brick Sort
- Maximum profit by buying and selling a share at most k times
- Pair with given product | Set 1 (Find if any pair exists)
- No of Factors of n!
- Cocktail Sort
- Gnome Sort
- Count zeros in a row wise and column wise sorted matrix
- Find minimum adjustment cost of an array
- Program to find last digit of n'th Fibonnaci Number
- Print all n-digit strictly increasing numbers
- Change if all bits can be made same by single flip
- Swap three variables without using temporary variable
- Find minimum sum such that one of every three consecutive elements is taken
- Least prime factor of numbers till n
- Bakhshali Approximation for computing square roots
- n'th multiple of a number in Fibonacci Series
- Group all occurrences of characters according to first appearance
- Elements before which no element is bigger in array
- Sum of average of all subsets
- Minimum XOR Value Pair
- Count pairs in an array that hold i*arr[i] > j*arr[j]
- Find (a^b)%m where 'a' is very large
- Generate all palindromic numbers less than n
- Count of character pairs at same distance as in English alphabets
- Probability of Knight to remain in the chessboard
- Check whether Arithmetic Progression can be formed from the given array
- Recursive Bubble Sort
- Largest subarray with GCD one
- Lexicographically smallest array after at-most K consecutive swaps
- Find floor and ceil in an unsorted array
- Recursive Insertion Sort
- Rotate a matrix by 90 degree without using any extra space | Set 2
- Given two unsorted arrays, find all pairs whose sum is x
- Fill an array based on frequency where elements are in range from 0 to n-1
- XOR of all subarray XORs | Set 1
- Stooge Sort
- Program for Conway's Game Of Life
- Find number of endless points
- Multiples of 3 and 5 without using % operator
- Number of even substrings in a string of digits
- Place k elements such that minimum distance is maximized
- Meta Strings (Check if two strings can become same after a swap in one string)
- Count the number of subarrays having a given XOR
- Minimum toggles to partition a binary array so that it has first 0s then 1s
- Digital Root (repeated digital sum) of the given large integer
- Construct an array from its pair-sum array
- Program to find number of squares in a chessboard
- Reverse an array upto a given position
- Print first k digits of 1/n where n is a positive integer
- Efficient Program to Compute Sum of Series 1/1! + 1/2! + 1/3! + 1/4! + .. + 1/n!
- Print All Distinct Elements of a given integer array
- Program to find remainder without using modulo or % operator
- Count 1's in a sorted binary array
- Given a number n, count all multiples of 3 and/or 5 in set {1, 2, 3, ... n}
- Replace every array element by multiplication of previous and next
- How to compute mod of a big number?
- Program to check if a given number is Lucky (all digits are different)
- Check if a given number can be represented in given a no. of digits in any base
- Program to print Sum Triangle for a given array
- Program to add two binary strings
- Add two numbers using ++ and/or --
- Prefix Sum Array - Implementation and Applications in Competitive Programming
- Program to find the largest and smallest ASCII valued characters in a string
- Pandigital number in a given base
- First digit in product of an array of numbers
- Save from Bishop in chessboard
- Maximum value of an integer for which factorial can be calculated on a machine
- Find the minimum and maximum amount to buy all N candies
- Rearrange an array such that every odd indexed element is greater than it previous
- Find the occurrences of digit d in the range [0..n]
- Largest Subset with GCD 1
- For each element in 1st array count elements less than or equal to it in 2nd array
- Program to count occurrence of a given character in a string
- Put spaces between words starting with capital letters
- Sum of all substrings of a string representing a number | Set 2 (Constant Extra Space)
- Minimum sum of two elements from two arrays such that indexes are not same
- Number of elements less than or equal to a given number in a given subarray | Set 2 (Including Updates)
- Split numeric, alphabetic and special symbols from a String
- Reverse a string preserving space positions
- Counts paths from a point to reach Origin
- Numbers having Unique (or Distinct) digits
- Sum of minimum absolute difference of each array element
- Count elements less than or equal to a given value in a sorted rotated array
- Longest Common Prefix using Sorting
- Count total divisors of A or B in a given range
- Maximum modulo of all the pairs of array where arr[i] >= arr[j]
- Check if a number N starts with 1 in b-base
- Find the transition point in a binary array
- Program to print Sum of even and odd elements in an array
- Check if a number can be written as a sum of 'k' prime numbers
- Check whether a given array is a k sorted array or not
- Minimum steps to come back to starting point in a circular tour
- Search an element in an unsorted array using minimum number of comparisons
- Number of pairs in an array such that product is greater than sum
- Find if a number is divisible by every number in a list
- Represent a given set of points by the best possible straight line
- Finding n-th number made of prime digits (2, 3, 5 and 7) only
- Find number of diagonals in n sided convex polygon
- Find all pairs (a, b) in an array such that a % b = k
- Check if a binary string has a 0 between 1s or not | Set 1 (General approach)
- Number of n-digits non-decreasing integers
- Find maximum possible stolen value from houses
- Check if a string is Isogram or not
- Fibonacci number in an array
- Count the numbers divisible by 'M' in a given range
- Count number of triplets with product equal to given number
- Sum of product of all elements of sub-arrays of size k
- Count of subarrays whose products don't have any repeating prime factor
- Print the string by ignoring alternate occurrences of any character
- Program for Decimal to Binary Conversion
- Number of substrings divisible by 4 in a string of integers
- Calculate the difficulty of a sentence
- Unset bits in the given range
- Queries for counts of array elements with values in given range
- Min flips of continuous characters to make all characters same in a string
- Climb n-th stair with all jumps from 1 to n allowed (Three Different Approaches)
- Check if array elements are consecutive in O(n) time and O(1) space (Handles Both Positive and negative numbers)
- Program to check if a matrix is symmetric
- Find coordinates of a prime number in a Prime Spiral
- Smallest sum contiguous subarray
- Print the following pyramid pattern
- Rearrange an array in order - smallest, largest, 2nd smallest, 2nd largest, ..
- Program that receives a number and prints it out in large size
- Sort first half in ascending and second half in descending order | 1
- Find element in a sorted array whose frequency is greater than or equal to n/2.
- Check if a destination is reachable from source with two movements allowed
- Number of digits in the product of two numbers
- 1 to n bit numbers with no consecutive 1s in binary representation
- Neon Number
- Program to check if three points are collinear
- Number of bitonic arrays of length n and consisting of elements from 1 to n
- Count even and odd digits in an Integer
- Toggle all bits after most significant bit
- Find row number of a binary matrix having maximum number of 1s
- Check if a number has two adjacent set bits
- Check if a number is power of 8 or not
- Find n-th element in a series with only 2 digits (4 and 7) allowed | Set 2 (log(n) method)
- Check if sums of i-th row and i-th column are same in matrix
- Find smallest number n such that n XOR n+1 equals to given k.
- Check Whether a number is Duck Number or not
- Find the sum of maximum difference possible from all subset of a given array.
- Sum of upper triangle and lower triangle
- Efficiently merging two sorted arrays with O(1) extra space
- Find if two people ever meet after same number of jumps
- Find most significant set bit of a number
- Count total bits in a number
- Counting pairs when a person can form pair with at most one
- Program to find sum of first n natural numbers
- Check if a line touches or intersects a circle
- Check whether a number can be expressed as a product of single digit numbers
- Minimum operations to make XOR of array zero
- Set all the bits in given range of a number
- Smallest number divisible by n and has at-least k trailing zeros
- Sort a binary array using one traversal
- Find position of the given number among the numbers made of 4 and 7
- Program to find the initials of a name.
- Maximum difference between group of k-elements and rest of the array.
- Number of subarrays having product less than K
- Sum of all numbers divisible by 6 in a given range
- Program to find simple interest
- Sum of the series 1 + (1+3) + (1+3+5) + (1+3+5+7) + …… + (1+3+5+7+…+(2n-1))
- GCD of digits of a given number
- Number of subarrays whose minimum and maximum are same
- Possibility of a word from a given set of characters
- Least Common Denominator (LCD)
- Shuffle array {a1, a2, .. an, b1, b2, .. bn} as {a1, b1, a2, b2, a3, b3, ……, an, bn} without using extra space
- Check if a number is divisible by all prime divisors of another number
- Mean and Median of a matrix
- Minimum reduce operations to convert a given string into a palindrome
- Median after K additional integers
- Program for product of array
- String with k distinct characters and no same characters adjacent
- Sum of multiples of a number up to N
- Mirror characters of a string
- Find the number of spectators standing in the stadium at time t
- Decode a median string to the original string
- Co-prime pair with given sum minimum difference
- Expectation or expected value of an array
- Counting cross lines in an array
- Number of n digit numbers that do not contain 9
- Remove all characters other than alphabets from string
- Elements to be added so that all elements of a range are present in array
- Number of visible boxes after putting one inside another
- Find if given number is sum of first n natural numbers
- Minimum cost to convert string into palindrome
- Merging elements of two different arrays alternatively in third array
- Check input character is alphabet, digit or special character
- Check whether a number can be represented by sum of two squares
- Longest sequence of positive integers in an array
- Count sub-arrays which have elements less than or equal to X
- Swap three numbers in cycle
- Convert to number with digits as 3 and 8 only
- Check if a large number is divisible by 13 or not
- Largest number with binary representation is m 1's and m-1 0's
- Circular array
- Leyland Number
- Position of robot after given movements
- Check whether the two numbers differ at one bit position only
- Program for Fahrenheit to Kelvin conversion
- Check whether the bit at given position is set or unset
- Longest subsequence where each character occurs at least k times
- Perfect Square String
- First uppercase letter in a string (Iterative and Recursive)
- Count of different ways to express N as the sum of 1, 3 and 4
- String from prefix and suffix of given two strings
- Ropes left after every removal of smallest
- Smallest subarray with product divisible by k
- Sum of all subsequences of a number
- Minimum total cost incurred to reach the last station
- Find the missing integer in an array if mean is given
- Divide two integers without using multiplication, division and mod operator
- Minimum distance between two occurrences of maximum
- Program to print the pattern "GFG"
- Check if the array is beautiful
- Minimum Swaps required to group all 1's together
- Sum of even numbers at even position
- Check if a given number is Pronic | Efficient Approach
- Sum over Subsets | Dynamic Programming
- Program to find all types of Matrix
- Product of nodes at k-th level in a tree represented as string
- Number is divisible by 29 or not
- Print all triplets in sorted array that form AP
- Print uncommon elements from two sorted arrays
- Sort 1 to N by swapping adjacent elements
- Find product of prime numbers between 1 to n
- Center element of matrix equals sums of half diagonals
- Fibonacci Cube Graph
- Number of loops of size k starting from a specific node
- Equalizing array using increment under modulo 3
- Find largest d in array such that a + b + c = d
- Number of subarrays having sum less than K
- Reaching a point using clockwise or anticlockwise movements
- Program to print reciprocal of letters
- Given equation of a circle as string, find area
- Maximum elements that can be made equal with k updates
- k-Rough Number or k-Jagged Number
- First N natural can be divided into two sets with given difference and co-prime sums
- Check a number is odd or even without modulus operator
- Repeated Unit Divisibility
- Sum of range in a series of first odd then even natural numbers
- Pattern to print X in a rectangular box
- Check if all occurrences of a character appear together
- Sub array sum is prime or not
- Number of ways an array can be filled with 0s and 1s such that no consecutive elements are 1
- Count of 'GFG' Subsequences in the given string
- Sum of bitwise OR of all possible subsets of given set
- Program to print Reverse Floyd's triangle
- Maximum points of intersection n circles
- Print prime numbers from 1 to N in reverse order
- Previous number same as 1's complement
- Replace two consecutive equal values with one greater
- Maximize a value for a semicircle of given radius
- Sorting array with reverse around middle
- Queries on sum of odd number digit sums of all the factors of a number
- Segregate even and odd numbers | Set 3
- Check if a number can be expressed as power | Set 2 (Using Log)