Sach_Code hasn't contributed any 'Articles' yet!

- Maximum difference between two elements such that larger element appears after the smaller number
- Find Union and Intersection of two unsorted arrays
- Draw a circle without floating point arithmetic
- Longest Arithmetic Progression | DP-35
- Find the element before which all the elements are smaller than it, and after which all are greater
- Why is Binary Search preferred over Ternary Search?
- Find the missing number in Arithmetic Progression
- Find the minimum cost to reach destination using a train
- Compute sum of digits in all numbers from 1 to n
- Find three closest elements from given three sorted arrays
- Count number of ways to divide a number in 4 parts
- Count pairs with given sum
- Find missing elements of a range
- Find size of the largest '+' formed by all ones in a binary matrix
- Maximize value of (arr[i] - i) - (arr[j] - j) in an array
- Sort an array according to count of set bits
- Minimum number of increment/decrement operations such that array contains all elements from 1 to N
- Maximum sum of pairs with specific difference
- Find Maximum Sum Strictly Increasing Subarray
- Find all sides of a right angled triangle from given hypotenuse and area | Set 1
- Find perimeter of shapes formed with 1s in binary matrix
- Minimum difference between adjacent elements of array which contain elements from each row of a matrix
- Allocate minimum number of pages
- Type of array and its maximum element
- Multiples of 3 and 5 without using % operator
- Maximum sum in a 2 x n grid such that no two elements are adjacent
- Count of smaller or equal elements in sorted array
- Find Index of 0 to be replaced with 1 to get longest continuous sequence of 1s in a binary array | Set-2
- Recursive Programs to find Minimum and Maximum elements of array
- Divide the two given numbers by their common divisors
- Queries for counts of array elements with values in given range
- Minimum rotations required to get the same string
- Maximum path sum in matrix
- Subset Sum Problem in O(sum) space
- Sum of all even numbers in range L and R
- Maximise the size of consecutive element subsets in an array
- Check if a number is power of 8 or not
- Check whether all the bits are unset in the given range or not
- Check whether the number has only first and last bits set
- Distance of closest zero to every element
- Generate permutations with only adjacent swaps allowed
- Find a Number X whose sum with its digits is equal to N
- Minimizing array sum by subtracting larger elements from smaller ones
- Find closest number in array
- Minimum number of subsets with distinct elements
- C Program for Find sum of odd factors of a number
- Find the one missing number in range
- Check if the given number K is enough to reach the end of an array
- Sum of each element raised to (prime-1) % prime
- n-th number whose sum of digits is ten
- Minimum adjacent swaps required to Sort Binary array
- Maximum elements that can be made equal with k updates
- Maximum difference between groups of size two
- Divisibility by 3 where each digit is the sum of all prefix digits modulo 10
- Number of digits in the nth number made of given four digits
- Print concentric rectangular pattern in a 2d matrix
- Highest power of two that divides a given number
- Recursive program to check if number is palindrome or not
- Minimum product in a grid of adjacent elements
- Count number of triplets in an array having sum in the range [a, b]
- Area of the Largest Triangle inscribed in a Hexagon
- Find three integers less than or equal to N such that their LCM is maximum
- Check if a number has same number of set and unset bits
- Number of different cyclic paths of length N in a tetrahedron
- Smallest sum contiguous subarray | Set-2
- Sum of all prime divisors of all the numbers in range L-R
- Maximum sum in circular array such that no two elements are adjacent
- Possible number of Rectangle and Squares with the given set of elements
- Number of handshakes such that a person shakes hands only once
- Number of possible pairs of Hypotenuse and Area to form right angled triangle
- Maximum profit after buying and selling the stocks
- Count permutation such that sequence is non decreasing
- Find the largest number that can be formed with the given digits
- Minimum numbers needed to express every integer below N as a sum
- Count ways to reach a score using 1 and 2 with no consecutive 2s
- Check if any large number is divisible by 19 or not
- Maximize the product of four factors of a Number
- Split the number into N parts such that difference between the smallest and the largest part is minimum
- Find the sum of first N terms of the series 2×3 + 4×4 + 6×5 + 8×6 + ...
- 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 convert KiloBytes to Bytes and Bits
- Program to print Kite Pattern
- Program to calculate the value of nCr Efficiently
- Count characters with same neighbors
- Program to print the Cot Bed Pattern
- Find nth Term of the Series 1 2 2 4 4 4 4 8 8 8 8 8 8 8 8 ...
- Gould's Sequence
- Find Tangent at a given point on the curve
- Minimum number of towers required such that every house is in the range of at least one tower
- Minimum swaps required to convert one binary string to another
- Check if the characters of a given string are in alphabetical order
- Maximum number of fixed points using atmost 1 swap
- Largest element in the array that is repeated exactly k times
- Sum of Fibonacci numbers at even indexes upto N terms
- Count unordered pairs (i,j) such that product of a[i] and a[j] is power of two
- Minimum time to reach a point with +t and -t moves at time t
- Program to find the Perimeter of a Regular Polygon
- Count the numbers < N which have equal number of divisors as K
- Minimum swaps required to make a binary string alternating
- All possible numbers of N digits and base B without leading zeros
- Find the Nth term of the series 1 + 2 + 6 + 15 + 31 + 56 + ...
- Online Queries for GCD of array after divide operations
- Print array elements in alternatively increasing and decreasing order
- Largest factor of a given number which is a perfect square
- Program to find Nth term divisible by a or b
- Longest subarray with elements divisible by k
- Find middle point segment from given segment lengths
- Check whether sum of digits at odd places of a number is divisible by K
- Minimum number of operations required to reduce N to 1
- Find the total marks obtained according to given marking scheme
- Count Number of animals in a zoo from given number of head and legs
- Number of triangles formed from a set of points on three lines
- Smallest prime divisor of a number
- Find the sum of all multiples of 2 and 5 below N
- Convert given array to Arithmetic Progression by adding an element
- Find consecutive 1s of length >= n in binary representation of a number
- Longest subarray with elements having equal modulo K
- Find the sum of first N odd Fibonacci numbers
- Count ordered pairs with product less than N
- Minimum Increment / decrement to make array elements equal
- Check whether (i,j) exists such that arr[i] != arr[j] and arr[arr[i]] is equal to arr[arr[j]]
- Minimum number of elements to be removed so that pairwise consecutive elements are same
- Absolute Difference of even and odd indexed elements in an Array
- Index with Minimum sum of prefix and suffix sums in an Array
- Count occurrences of a character in a repeated string
- GCD of a number raised to some power and another number
- Farthest distance of a 0 from the center of a 2-D matrix
- Find Maximum side length of square in a Matrix
- Number of strictly increasing Buildings from right with distinct Colors
- Program to find the profit or loss when CP of N items is equal to SP of M items
- Change K elements so that (a1^2 + a2^2 + …+ aN^2 ) <= (a1 + a2 +…+ aN) becomes true
- Find two numbers whose sum and GCD are given
- Program to find the sum of the series (1/a + 2/a^2 + 3/a^3 + ... + n/a^n)
- Sum of common divisors of two numbers A and B
- Sum of all odd natural numbers in range L and R
- Partiton N into M parts such that difference between Max and Min part is smallest
- Number of pairs with Bitwise OR as Odd number
- Check if N can be represented as sum of integers chosen from set {A, B}
- Check if N is divisible by a number which is composed of the digits from the set {A, B}
- Find maximum element of each column in a matrix
- Size of the smallest subset with maximum Bitwise OR
- Replace every element of the array by its previous element
- Expressing a fraction as a natural number under modulo 'm'
- Minimum and Maximum number of pairs in m teams of n people
- Maximize the difference between two subsets of a set with negatives
- Reduce the array to a single element with the given operation
- Sum of the multiples of two numbers below N
- Check if the sum of perfect squares in an array is divisible by x
- Sum of integers upto N with given unit digit
- Count sub-sets that satisfy the given condition
- Leftmost and rightmost indices of the maximum and the minimum element of an array
- Lower Insertion Point
- Minimum value that divides one number and divisible by other
- Minimum in an array which is first decreasing then increasing
- Form N-copy string with add, remove and append operations
- Find minimum x such that (x % k) * (x / k) == n
- Find minimum x such that (x % k) * (x / k) == n | Set-2
- Sum of kth powers of first n natural numbers
- Diagonal of a Regular Pentagon
- Minimize the maximum minimum difference after one removal from array
- Length of Diagonal of a n-sided regular polygon
- Count number of pairs (i, j) such that arr[i] * arr[j] > arr[i] + arr[j]
- Check whether a number is Non-hypotenuse number
- Find the repeating and the missing number using two equations
- Minimum number N such that total set bits of all numbers from 1 to N is at-least X
- Find the non decreasing order array from given array
- Minimum cost of choosing 3 increasing elements in an array of size N
- Queries for number of distinct integers in Suffix
- Number of sub arrays with negative product
- Find the XOR of first N Prime Numbers
- Program to find the number from given holes
- Find third number such that sum of all three number becomes prime
- Total ways of selecting a group of X men from N men with or without including a particular man