- Sum of first n terms of a given series 3, 6, 11, .....
- 2D and 2.5D Memory organization
- Sum of the series 3, 20, 63, 144, ......
- Find the sum of n terms of the series 1,8,27,64 ....
- Find the sum of the series 2, 5, 13, 35, 97...
- Read and Write operations in Memory
- Find the missing value from the given equation a + b = c
- Program to find the Centroid of the triangle
- Find the altitude and area of an isosceles triangle
- Program to find the surface area of the square pyramid
- Program to find volume and surface area of pentagonal prism
- Assembly language program to find the range of bytes
- Register content and Flag status after Instructions
- Ways of selecting men and women from a group to make a team
- Number of ways to arrange a word such that all vowels occur together
- Program to evaluate the expression (√X+1)^6 + (√X-1)^6
- Python | OpenCV BGR color palette with trackbars
- Arrangement of the characters of a word such that all vowels are at odd places
- Number of triangles formed from a set of points on three lines
- Number of words in a camelcase sequence
- Greatest Integer Function
- Permutations of n things taken r at a time with k things together
- N digit numbers divisible by 5 formed from the M digits
- Minimum steps to remove substring 010 from a binary string
- Maximums from array when the maximum decrements after every access
- Maximum sum and product of the M consecutive digits in a number
- Index with Minimum sum of prefix and suffix sums in an Array
- Count occurrences of a character in a repeated string
- Sum of the alphabetical values of the characters of a string
- Software Engineering | Curve Fitting models
- Draw a triangle with centroid using OpenCV
- Permutations of string such that no two vowels are adjacent
- Cost to make a string Panagram
- Convert a String into a square matrix grid of characters
- Longest Sub-array with maximum average value
- Maximum occurrence of prefix in the Array
- Replace every consonant sequence with its length in the given string
- Deletions of "01" or "10" in binary string to make it free from "01" or "10"
- Reduce the fraction to its lowest form
- Divide a number into two parts
- Number of edges in mirror image of Complete binary tree
- Sum of GCDs of each row of the given matrix
- Count the nodes whose sum with X is a Fibonacci number
- Reduce the array to a single integer with the given operation
- Count the nodes of the tree whose weighted string contains a vowel
- Count of cells in a matrix which give a Fibonacci number when the count of adjacent cells is added
- Find max length odd parity substring

- Program to find whether a no is power of two
- Program to find parity
- Count digits in given number N which divide N
- Find the maximum distance covered using n bikes
- Check if binary representation of a number is palindrome
- Count number of ways to partition a set into k subsets
- Euler's criterion (Check if square root under modulo p exists)
- Volume of cube using its space diagonal
- Linear Diophantine Equations
- Find frequency of each element in a limited range array in less than O(n) time
- Number of ways to calculate a target number using only array elements
- Find number of subarrays with even sum
- Maximum value K such that array has at-least K elements that are >= K
- Find profession in a special family
- Reverse an array in groups of given size | Set 2 (Variations of Set 1 )
- Find Two Missing Numbers | Set 1 (An Interesting Linear Time Solution)
- Sort an array according to count of set bits
- Swap three variables without using temporary variable
- Find minimum elements after considering all possible transformations
- Minimum number of increment/decrement operations such that array contains all elements from 1 to N
- Minimum steps to reach end of array under constraints
- Number of swaps to sort when only adjacent swapping allowed
- Convert a number into negative base representation
- Find all sides of a right angled triangle from given hypotenuse and area | Set 1
- Count number of ways to reach destination in a Maze
- Find all distinct subset (or subsequence) sums of an array
- Compare two integers without using any Comparison operator
- Minimum number of page turns to get to a desired page
- Minimum number of equal amount bags to collect at least M money
- Largest divisible subset in array
- K difference permutation
- Find ways an Integer can be expressed as sum of n-th power of unique natural numbers
- Number of even substrings in a string of digits
- Solving f(n)= (1) + (2*3) + (4*5*6) ... n using Recursion
- Generate all binary permutations such that there are more or equal 1's than 0's before every point in all permutations
- Remove repeated digits in a given number
- Greedy Algorithm to find Minimum number of Coins
- Find whether a subarray is in form of a mountain or not
- Sort an array of strings according to string lengths
- Count the number of ways to divide an array into three contiguous parts having equal sum
- Rearrange an array such that every odd indexed element is greater than it previous
- Fibonacci modulo p
- Find the sum of all the terms in the n-th row of the given series
- Program for quotient and remainder of big number
- Length of the transverse common tangent between the two non intersecting circles
- Divide the two given numbers by their common divisors
- Queries for decimal values of subarrays of a binary array
- Find the Sub-array with sum closest to 0
- Round-off a number to a given number of significant digits
- Number of substrings divisible by 4 in a string of integers
- Ways to remove one element from a binary string so that XOR becomes zero
- Longest Prime Subarray after removing one element
- Maximum sum subarray having sum less than or equal to given sum
- Compute average of two numbers without overflow
- Largest number with the given set of N digits that is divisible by 2, 3 and 5
- Count subarrays with equal number of occurrences of two given elements
- Check whether a given point lies inside a rectangle or not
- Binary array after M range toggle operations
- All possible binary numbers of length n with equal sum in both halves
- Minimum number of Square Free Divisors
- Smallest index such that there are no 0 or 1 to its right
- A sorting algorithm that slightly improves on selection sort
- Find element at given index after given range reversals
- Find the winner of a game where scores are given as a binary string
- Unique element in an array where all elements occur k times except one
- Print N-bit binary numbers having more 1’s than 0’s in all prefixes
- Count of substrings of a binary string containing K ones
- Longest alternating sub-array starting from every index in a Binary Array
- Check whether a number has exactly three distinct factors or not
- Longest Repeated Subsequence
- Smallest integer with digit sum M and multiple of N
- Replace two substrings (of a string) with each other
- Maximum length subsequence possible of the form R^N K^N
- Lexicographically smallest string whose hamming distance from given string is exactly K
- Area of a triangle inscribed in a rectangle which is inscribed in an ellipse
- Print digit's position to be removed to make a number divisible by 6
- Check if an encoding represents a unique binary string
- Longest subarray having count of 1s one more than count of 0s
- Longest subsequence with no 0 after 1
- Minimum number of elements to add to make median equals x
- Divisibility by 64 with removal of bits allowed
- Longest subsequence of the form 0*1*0* in a binary string
- Longest subarray not having more than K distinct elements
- Check whether the given array is perfect or not
- Largest in array without using conditionals / bitwise / ternary operators
- Count sub-arrays which have elements less than or equal to X
- Minimum flips to make all 1s in left and 0s in right | Set 2
- Construct a distinct elements array with given size, sum and element upper bound
- Find maximum in an array without using Relational Operators
- Split the string into substrings using delimiter
- Minimum cost to construct a string
- Queries for maximum difference between prime numbers in given ranges
- Encrypt string with product of number of vowels and consonants in substring of size k
- Count of possible hexagonal walks
- Partition into two subarrays of lengths k and (N - k) such that the difference of sums is maximum
- Longest subarray with sum divisible by k
- Minimum number of subsets with distinct elements
- Count subsequence of length three in a given string
- Program to find the sum of a Series (1*1) + (2*2) + (3*3) + (4*4) + (5*5) + ... + (n*n)
- Count of subsequences having maximum distinct elements
- Maximum occurring character in an input string | Set-2
- Area of the biggest possible rhombus that can be inscribed in a rectangle
- Count consonants in a string (Iterative and recursive methods)
- Find the position of the last removed element from the array
- Find the Number which contain the digit d
- Program to implement t-test
- HCF of array of fractions (or rational numbers)
- Number of unique triplets whose XOR is zero
- Sparse Search
- Check whether bits are in alternate pattern in the given range | Set-2
- Program to check if matrix is singular or not
- Sum of columns of a 2-D Matrix where first element is odd
- Number of integers with odd number of set bits
- Array with GCD of any of its subset belongs to the given array
- Find nth term of the Dragon Curve Sequence
- Program to find the Nth term of the series 3, 7, 13, 21, 31.....
- Cost to Balance the parentheses
- Maximum equlibrium sum in an array
- Previous number same as 1's complement
- Maximum average sum partition of an array
- Printing longest Increasing consecutive subsequence
- Number of ways to form an array with distinct adjacent elements
- Count number of pairs in array having sum divisible by K | SET 2
- Minimum bit changes in Binary Circular array to reach a index
- Number whose XOR sum with given array is a given number k
- Maximum length of a sub-array with ugly numbers
- Minimum value of "max + min" in a subarray
- Largest set with bitwise OR equal to n
- Subtract 1 without arithmetic operators
- Number with set bits only between L-th and R-th index
- First X vowels from a string
- Find a Symmetric matrix of order N that contain integers from 0 to N-1 and main diagonal should contain only 0's
- Sum of multiplication of triplet of divisors of a number
- Recursive program to generate power set
- Repeated Character Whose First Appearance is Leftmost
- Maximum Product Subarray | Set 3
- Find the node whose xor with x gives maximum value
- Puzzle | Minimum distance for Lizard
- Count the number of intervals in which a given value lies
- kth smallest/largest in a small range unsorted array
- Program to calculate the Surface Area of a Triangular Prism
- Modify string by removing vowels in between two consonants
- Queries of nCr%p in O(1) time complexity
- Program to determine the octant of the axial plane
- Absolute difference between the first X and last X Digits of N
- Find all distinct subset (or subsequence) sums of an array | Set-2
- Longest substring with count of 1s more than 0s
- Weird Number
- 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
- Reallocation of elements based on Locality of Reference
- Length and Breadth of rectangle such that ratio of Area to diagonal^2 is maximum
- Delete array element in given index range [L - R]
- Number of Co-prime pairs obtained from the sum of digits of elements in the given range
- Count the number of pairs that have column sum greater than row sum
- Longest chain of arr[i], arr[arr[i]], .. without repetition
- Split array to three subarrays such that sum of first and third subarray is equal and maximum
- Modulus of all pairwise consecutive elements in an Array
- Print the last occurrence of elements in array in relative order
- Maximum profit after buying and selling the stocks
- Lowest Common Ancestor in Parent Array Representation
- Lexicographically smallest and largest substring of size k
- Count no. of ordered subsets having a particular XOR value
- Comparing leading zeros in binary representations of two numbers
- Find the Next perfect square greater than a given number
- Program to find the Nth term of the series 3, 20, 63, 144, 230, ……
- 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, ...
- Minimum number of items to be delivered
- Program to find the Nth term of the series 0, 14, 40, 78, 124, ...
- Program to find the Nth term of the series 0, 5, 14, 27, 44, ........
- Count ways to reach a score using 1 and 2 with no consecutive 2s
- Maximum length of segments of 0's and 1's
- Concatenate strings in any order to get Maximum Number of "AB"
- Program to calculate Bitonicity of an Array
- Find all angles of a triangle in 3D
- Sum of first n term of Series 3, 5, 9, 17, 33....
- Generating subarrays using recursion
- Find the number after successive division
- Sum of first n terms of a given series 3, 6, 11, .....
- Sum of first N terms of Quadratic Sequence 3 + 7 + 13 + ...
- Check if given string can be formed by two other strings or their permutations
- Rotations of a Binary String with Odd Value
- Find the sum of series 3, 7, 13, 21, 31....
- Find sum of the series 1-2+3-4+5-6+7.......
- Find sum of the series 1+22+333+4444+...... upto n terms
- Find the sum of infinite series 1^2.x^0 + 2^2.x^1 + 3^2.x^2 + 4^2.x^3 +.......
- Find area of triangle if two vectors of two adjacent sides are given
- Area of a circle inscribed in a regular hexagon
- Split the number into N parts such that difference between the smallest and the largest part is minimum
- Check if a point is inside, outside or on the ellipse
- Find nth term of a given recurrence relation
- Check if a point is inside, outside or on the parabola
- First triangular number whose number of divisors exceeds N
- Find the Nth term of the series 2 + 6 + 13 + 23 + . . .
- Find the sum of series 3, -6, 12, -24 . . . upto N terms
- Program to print the Sum of series -1 + 2 + 11 + 26 + 47 +.....
- Program to find Nth term of the series 3, 12, 29, 54, 87, ...
- Program to find Nth term of the series 3 , 5 , 21 , 51 , 95 , ...
- Program to find the sum of the series 23+ 45+ 75+..... upto N terms
- Program to print Hut
- 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, .....
- Find the direction from given string
- Sum of all Primes in a given range using Sieve of Eratosthenes
- Program to find volume and surface area of pentagonal prism
- Count characters with same neighbors
- Print a number strictly less than a given number such that all its digits are distinct.
- Divide an isosceles triangle in two parts with ratio of areas as n:m
- Program to solve the Alligation Problem
- Area of a circle inscribed in a rectangle which is inscribed in a semicircle
- Area of a square inscribed in a circle which is inscribed in a hexagon
- Find the k-th smallest divisor of a natural number N
- Radius of the biggest possible circle inscribed in rhombus which in turn is inscribed in a rectangle
- Check if a string can be rearranged to form special palindrome
- Program to find the maximum element in a Matrix
- Maximize number of nodes which are not part of any edge in a Graph
- Program to print the pattern with two hollow Triangles
- Find normal at a given point on the curve
- Product of non-repeating (distinct) elements in an Array
- Program to find the side of the Octagon inscribed within the square
- Program to replace every space in a string with hyphen
- Program to Calculate the Perimeter of a Decagon
- Minimum number of nodes in an AVL Tree with given height
- Program to Print Mirrored Hollow Parallelogram
- Program to find sum of 1 + x/2! + x^2/3! +...+x^n/(n+1)!
- 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
- Program to find the Area and Perimeter of a Semicircle
- Minimum time to reach a point with +t and -t moves at time t
- Maximize the sum of array by multiplying prefix of array with -1
- Program to find the Perimeter of a Regular Polygon
- Minimum swaps required to make a binary string alternating
- Find sum of N-th group of Natural Numbers
- Check if a number is a Trojan Number
- Rearrange all elements of array which are multiples of x in increasing order
- Section formula for 3 D
- Check if a number is an Achilles number or not
- Equation of circle from centre and radius
- Minimum squares to evenly cut a rectangle
- Minimum boxes required to carry all gifts
- Equation of parabola from its focus and directrix
- Round to next smaller multiple of 8
- Find the foot of perpendicular of a point in a 3 D plane
- Calculate volume and surface area of Torus
- Assign other value to a variable from two possible values
- Longest subarray with elements divisible by k
- Check whether a number has consecutive 0's in the given base or not
- Sorting array elements with set bits equal to K
- Replace all consonants with nearest vowels in a string
- Find middle point segment from given segment lengths
- Check whether sum of digits at odd places of a number is divisible by K
- Minimum array elements to be changed to make it a Lucas Sequence
- Maximum number of contiguous array elements with same number of set bits
- Equation of ellipse from its focus, directrix, and eccentricity
- Count Number of animals in a zoo from given number of head and legs
- Find permutation of n which is divisible by 3 but not divisible by 6
- Maximum area of rectangle possible with given perimeter
- Area of decagon inscribed within the circle
- Count subarrays consisting of only 0's and only 1's in a binary array
- Find maximum distance between any city and station
- Sum and Product of all Composite numbers which are divisible by k in an array
- Program to calculate area and perimeter of a rhombus whose diagonals are given
- Program to find Nth term of series 7, 21, 49, 91, 147, 217, ......
- Count the number of elements in an array which are divisible by k
- Count occurrences of the average of array elements with a given number
- Count ordered pairs with product less than N
- 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
- Find maximum volume of a cuboid from the given perimeter and area
- Program to print hollow Triangle pattern
- Minimize the value of N by applying the given operations
- Count the number of vowels occurring in all the substrings of given string
- Find if array has an element whose value is half of array sum
- GCD of a number raised to some power and another number
- Largest cube that can be inscribed within the sphere
- Sum of all the multiples of 3 and 7 below N
- Largest sphere that can be inscribed inside a cube
- Position after taking N steps to the right and left in an alternate manner
- Count pieces of circle after N cuts
- Find Selling Price from given Profit Percentage and Cost
- Find Maximum side length of square in a Matrix
- XOR of all elements of array with set bits equal to K
- Count number of bits changed after adding 1 to given N
- Different possible marks for n questions and negative marking
- Number of strictly increasing Buildings from right with distinct Colors
- Find two numbers with sum and product both same as N
- Find two numbers whose sum and GCD are given
- Maximum litres of water that can be bought with N Rupees
- Find the player who rearranges the characters to get a palindrome string first
- Find the number of primitive roots modulo prime
- Largest sub-array whose all elements are perfect squares
- Sum of multiples of A and B less than N
- Sum of common divisors of two numbers A and B
- Check if a large number is divisible by 75 or not
- Minimum number of characters to be replaced to make a given string Palindrome
- Count of cyclic permutations having XOR with other binary string as 0
- Number of ways to swap two bit of s1 so that bitwise OR of s1 and s2 changes
- Check if the array has an element which is equal to product of remaining elements
- Maximum number of parallelograms that can be made using the given length of line segments
- Minimum sum after subtracting multiples of k from the elements of the array
- Minimum steps to convert one binary string to other only using negation
- Program to print 'N' alphabet using the number pattern from 1 to n
- Ratio of area of a rectangle with the rectangle inscribed in it
- Partiton N into M parts such that difference between Max and Min part is smallest
- Largest number in an array that is not a perfect cube
- Print sum of matrix and its mirror image
- Largest perfect cube number in an Array
- Minimum number of moves required to reach the destination by the king in a chess board
- Minimum elements to be added in a range so that count of elements is divisible by K
- Sum of the digits of a number N written in all bases from 2 to N/2
- Lexicographically smallest substring with maximum occurrences containing a's and b's only
- Sorting rows of matrix in descending order followed by columns in ascending order
- Find sum of a number and its maximum prime factor
- Distance between two nodes of binary tree with node values from 1 to N
- Sum of elements whose square root is present in the array
- Range and Coefficient of range of Array
- Frequency of each element of an array of small ranged values
- Size of the smallest subset with maximum Bitwise OR
- Replace every element of the array by its previous element
- Sum of first N natural numbers which are divisible by X or Y
- Check if a number is Triperfect Number
- Length of rope tied around three equal circles touching each other
- Maximize the difference between two subsets of a set with negatives
- Check if the given decimal number has 0 and 1 digits only
- Number of Binary Strings of length N with K adjacent Set Bits
- Sum of the multiples of two numbers below N
- Sort the array in a given index range
- Concatenate suffixes of a String
- Minimum absolute difference of a number and its closest prime
- Largest palindromic number in an array
- Split a number into 3 parts such that none of the parts is divisible by 3
- Sum of integers upto N with given unit digit
- Closest perfect square and its distance
- Count sub-sets that satisfy the given condition
- Leftmost and rightmost indices of the maximum and the minimum element of an array
- Find nth Hermite number
- Longest Subsequence where index of next element is arr[arr[i] + i]
- Smallest subarray containing minimum and maximum values
- Find minimum x such that (x % k) * (x / k) == n | Set-2
- Minimize the maximum minimum difference after one removal from array
- Sum of LCM(1, n), LCM(2, n), LCM(3, n), ... , LCM(n, n)
- Buy minimum items without change and given coins
- Check if all elements of the array are palindrome or not
- Count common prime factors of two numbers
- Occurrences of a pattern in binary representation of a number
- Represent n as the sum of exactly k powers of two | Set 2
- Number of ways to remove a sub-string from S such that all remaining characters are same
- Count number of pairs (i, j) such that arr[i] * arr[j] > arr[i] + arr[j]
- Find probability that a player wins when probabilities of hitting the target are given
- Minimum absolute difference between N and a power of 2
- Number of subarrays have bitwise OR >= K
- Find cost price from given selling price and profit or loss percentage
- First and Last Three Bits
- Length of the longest substring with consecutive characters
- Smallest perfect Cube divisible by all elements of an array
- Recursive program to print all numbers less than N which consist of digits 1 or 3 only
- Cost to make a string Panagram | Set 2
- 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 Proth primes up to N
- Count of strings that become equal to one of the two strings after one removal
- Count of Numbers such that difference between the number and sum of its digits not less than L
- Check if a string can be repeated to make another string
- Largest number less than or equal to N/2 which is coprime to N
- Sort even and odd placed elements in increasing order
- Print all multiplicative primes <= N
- Find the resulting Colour Combination
- Find the Side of the smallest Square that can contain given 4 Big Squares
- Find array using different XORs of elements in groups of size 4
- Midpoint ellipse drawing algorithm
- Make all elements of an array equal with the given operation
- Minimum operations of the given type required to make a complete graph
- Count of pairs of (i, j) such that ((n % i) % j) % n is maximized
- Array element with minimum sum of absolute differences
- Decrypt a string encrypted by repeating i-th character i times
- Minimum replacements to make adjacent characters unequal in a ternary string
- Program to find LCM of two Fibonnaci Numbers
- Minimum operations required to make all the array elements equal
- Ways to divide a binary array into sub-arrays such that each sub-array contains exactly one 1
- Program to Assign grades to a student using Nested If Else
- Maximum number of teams that can be formed with given persons
- Maximum count of sub-strings of length K consisting of same characters
- Maximize the value of x + y + z such that ax + by + cz = n
- Number of sub-strings that contain the given character exactly k times
- Find integers that divides maximum number of elements of the array
- Maximum size of sub-array that satisfies the given condition
- Numbers of Length N having digits A and B and whose sum of digits contain only digits A and B
- Maximum sum after repeatedly dividing N by a divisor
- Lexicographically largest sub-sequence of the given string
- Minimum number of operations to move all uppercase characters before all lower case characters
- Number of ways to choose an integer such that there are exactly K elements greater than it in the given array
- Find frequency of smallest value in an array
- Acronym words
- Maximum number of segments that can contain the given points
- Modify a binary array to Bitwise AND of all elements as 1
- Minimum number of given operations required to convert a string to another string
- Minimum replacements to make adjacent characters unequal in a ternary string | Set-2
- Pick maximum sum M elements such that contiguous repetitions do not exceed K
- Minimize the sum of the squares of the sum of elements of each group the array is divided into
- Find a positive number M such that gcd(N^M, N&M) is maximum
- Given two binary strings perform operation until B > 0 and print the result
- Minimum number of moves to make a binary array K periodic
- Iterating over all possible combinations in an Array using Bits
- Check whether two strings are equivalent or not according to given condition
- Smallest Special Prime which is greater than or equal to a given number
- Select numbers in such way to maximize the amount of money
- Maximum Bitwise AND pair from given range
- Print k different sorted permutations of a given array
- Longest sub-sequence of array containing Lucas numbers
- Sum of the natural numbers (up to N) whose modulo with K yield R
- Find N % 4 (Remainder with 4) for a large value of N
- Schedule elevator to reduce the total time taken
- Minimum elements to be removed such that sum of adjacent elements is always even
- Maximum length subarray with difference between adjacent elements as either 0 or 1
- Count numbers in range 1 to N which are divisible by X but not by Y
- Number of trailing zeroes in base B representation of N!
- Minimum distance to the corner of a grid from source
- Pick points from array such that minimum distance is maximized
- Minimum cost to make two strings same
- Minimum matches the team needs to win to qualify
- Maximum length of balanced string after swapping and removal of characters
- Print all the sum pairs which occur maximum number of times
- Count permutations that are first decreasing then increasing.
- Check whether the Average Character of the String is present or not
- Series summation if T(n) is given and n is very large
- Minimum cost to form a number X by adding up powers of 2
- Program to calculate the value of nPr
- Check if the given string is K-periodic
- Smallest and Largest Palindrome with N Digits
- Count how many times the given digital clock shows identical digits
- Search an element in given N ranges
- Minimum cuts required to convert a palindromic string to a different palindromic string
- Check if matrix can be converted to another matrix by transposing square sub-matrices
- First string from the given array whose reverse is also present in the same array
- Count of pairs from 1 to a and 1 to b whose sum is divisible by N
- Check if Matrix remains unchanged after row reversals
- Generate all the binary strings of N bits
- Maximum trace possible for any sub-matrix of the given matrix
- Position of the K-th set bit in a number
- Print a number as string of 'A' and 'B' in lexicographic order
- Sort elements of the array that occurs in between multiples of K
- Print the longest prefix of the given string which is also the suffix of the same string
- Minimum cost to reach end of array array when a maximum jump of K index is allowed
- Count pairs with bitwise OR less than Max
- Queries to return the absolute difference between L-th smallest number and the R-th smallest number
- Perform K of Q queries to maximize the sum of the array elements
- Programs for printing pyramid patterns using recursion
- Maximize the median of the given array after adding K elements to the same array
- Replace all elements by difference of sums of positive and negative numbers after that element
- Program to find the kth character after decrypting a string
- Print all Semi-Prime Numbers less than or equal to N
- Minimize the cost to split a number
- Program to find the time after K minutes from given time
- Minimum number of given operation required to convert n to m
- Number of ways in which the substring in range [L, R] can be formed using characters out of the range
- Maximum volume of cube for every person when edge of N cubes are given
- Minimum number operations required to convert n to m | Set-2
- Maximum consecutive one’s (or zeros) in a binary circular array
- Find the maximum number of composite summands of a number
- Count common characters in two strings
- Minimum value to add to arr[i] so that an array can be split at index i with equal sum
- Sum of degrees of all nodes of a undirected graph
- Find the hypotenuse of a right angled triangle with given two sides
- Print last character of each word in a string
- Sort ugly numbers in an array at their relative positions
- Replace array elements by sum of next two consecutive elements
- Maximum array sum that can be obtained after exactly k changes
- Given an array and two integers l and r, find the kth largest element in the range [l, r]
- Check if factorial of N is divisible by the sum of squares of first N natural numbers
- Find the number of jumps to reach X in the number line from zero
- Element in a matrix starting from which anti-clockwise traversal ends at the last element
- Find the final radiations of each Radiated Stations
- Count number of binary strings of length N having only 0's and 1's
- Find original numbers from gcd() every pair
- Check if a given number divides the sum of the factorials of its digits
- Count the number of pairs (i, j) such that either arr[i] is divisible by arr[j] or arr[j] is divisible by arr[i]
- Find the sum of the diagonal elements of the given N X N spiral matrix
- Find the number of binary strings of length N with at least 3 consecutive 1s
- Minimum number of given operations required to convert a permutation into an identity permutation
- Find the count of sub-strings whose characters can be rearranged to form the given word
- Count all prefixes of the given binary array which are divisible by x
- Elements greater than the previous and next element in an Array
- Find the number of elements greater than k in a sorted array
- Find maximum sum taking every Kth element in the array
- Find missing element in a sorted array of consecutive numbers
- Find the number of players who roll the dice when the dice output sequence is given
- Program to calculate product of digits of a number
- Print the first and last character of each word in a String
- Minimum possible final health of the last monster in a game
- Check if two strings are same ignoring their cases
- Find the sum of digits of a number at even and odd places
- Count the number of sub-arrays such that the average of elements present in the sub-array is greater than that not present in the sub-array
- Check if product of first N natural numbers is divisible by their sum
- Check if matrix A can be converted to B by changing parity of corner elements of any submatrix
- Maximum sum of cocktail glass in a 2D matrix
- Minimum length of the sub-string whose characters can be used to form a palindrome of length K
- Find the maximum possible value of a[i] % a[j] over all pairs of i and j
- Sum of elements in 1st array such that number of elements less than or equal to them in 2nd array is maximum
- Given a string and an integer k, find the kth sub-string when all the sub-strings are sorted according to the given condition
- Check whether the given string is a valid identifier
- Find the nth term of the given series
- Move all zeros to start and ones to end in an Array of random integers
- Queries to update a given index and find gcd in range
- Product of all Subsequences of size K except the minimum and maximum Elements
- Longest substring of only 4's from the first N characters of the infinite string
- Equation of straight line passing through a given point which bisects it into two equal line segments
- Largest number not greater than N which can become prime after rearranging its digits
- Count arrays of length K whose product of elements is same as that of given array
- Remove all occurrences of any element for maximum array sum
- Maximum elements which can be crossed using given units of a and b
- Minimum value of X to make all array elements equal by either decreasing or increasing by X
- Minimum cost to modify a string
- Find the minimum sum of distance to A and B from any integer point in a ring of size N
- Game Theory in Balanced Ternary Numeral System | (Moving 3k steps at a time)
- Check if string can be made lexicographically smaller by reversing any substring
- Count of quadruplets with given Sum | Set 2
- Number of character corrections in the given strings to make them equal
- Reorder the position of the words in alphabetical order
- Given two arrays count all pairs whose sum is an odd number
- Count pairs with average present in the same array
- Queries to answer the X-th smallest sub-string lexicographically
- Find element with the maximum set bits in an array
- Generate an array of K elements such that sum of elements is N and the condition a[i] < a[i+1] <= 2*a[i] is met | Set 2
- Calculate score for the given binary string
- Count number of 1s in the array after N moves
- Find permutation of first N natural numbers that satisfies the given condition
- Check if the robot is within the bounds of the grid after given moves
- Make lexicographically smallest palindrome by substituting missing characters
- Count number of subsets whose median is also present in the same subset
- Compare sum of first N-1 elements to Nth element of an array
- Choose X such that (A xor X) + (B xor X) is minimized
- Program to print an array in Pendulum Arrangement with constant space
- Ratio of the distance between the centers of the circles and the point of intersection of two direct common tangents to the circles
- Find a number which give minimum sum when XOR with every number of array of integers
- Generate an Array in which count of even and odd sum sub-arrays are E and O respectively
- Maximum sum path in a matrix from top to bottom and back
- Find prime number K in an array such that (A[i] % K) is maximum
- Count Pairs from two arrays with even sum
- GCD from root to leaf path in an N-ary tree
- Check whether product of integers from a to b is positive , negative or zero
- Maximum sum such that no two elements are adjacent | Set 2
- Count of distinct rectangles inscribed in an equilateral triangle
- Check if the number is even or odd whose digits and base (radix) is given
- Check whether a number can be represented as sum of K distinct positive integers
- Count index pairs which satisfy the given condition
- Minimum number of operations on a binary string such that it gives 10^A as remainder when divided by 10^B
- Minimize the number of steps required to reach the end of the array | Set 2
- Minimum steps required to reach the end of a matrix | Set 2
- Queries for bitwise AND in the given matrix
- Queries for bitwise OR in the given matrix
- Generate all unique partitions of an integer | Set 2
- Check if the given array contains all the divisors of some integer
- Find N distinct numbers whose bitwise Or is equal to K
- Maximum sum in an array such that every element has exactly one adjacent element to it
- Find the number of pair of Ideal nodes in a given tree
- Split the given array into K sub-arrays such that maximum sum of all sub arrays is minimum
- Find number of factors of N when location of its two factors whose product is N is given
- Minimum time required to rot all oranges | Dynamic Programming
- Find a subarray whose sum is divisible by size of the array
- Find the height of a right-angled triangle whose area is X times its base
- Find the number of words of X vowels and Y consonants that can be formed from M vowels and N consonants
- Sum of all second largest divisors after splitting a number into one or more parts
- Count pairs in an array such that the absolute difference between them is ≥ K
- Count equal pairs from given string arrays
- Check if a number is Fermat Pseudoprime
- Divide the array in K segments such that the sum of minimums is maximized
- Maximum value after merging all elements in the array
- Map every character of one string to another such that all occurrences are mapped to the same character
- Find area of the larger circle when radius of the smaller circle and difference in the area is given
- All unique combinations whose sum equals to K
- Find the prime P using given four integers
- Maximum sum combination from two arrays
- Convert a String to an Integer using Recursion
- Program to find the Speed of train as per speed of sound
- Lexicographically largest permutation of the array such that a[i] = a[i-1] + gcd(a[i-1], a[i-2])
- Program to find the Depreciation of Value
- Modular Exponentiation of Complex Numbers
- Check if the product of every contiguous subsequence is different or not in a number
- Find the final sequence of the array after performing given operations
- Find all combinations of two equal sum subsequences
- Right most non-zero digit in multiplication of array elements
- Number of shortest paths to reach every cell from bottom-left cell in the grid
- Find the smallest positive number missing from an unsorted array | Set 3
- Find minimum changes required in an array for it to contain k distinct elements
- Find the ln(X) and log
_{10}X with the help of expansion - Round the given number to nearest multiple of 10 | Set-2
- Minimum number of Binary strings to represent a Number
- Remove duplicates from unsorted array using Set data structure
- Find the average of k digits from the beginning and l digits from the end of the given number
- Count the number of occurrences of a particular digit in a number