1. Return maximum occurring character in an input string
  2. Minimum insertions to sort an array
  3. Majority Element
  4. Position of rightmost set bit
  5. Largest Sum Contiguous Subarray
  6. Merge an array of size n into another array of size m+n
  7. k largest(or smallest) elements in an array | added Min Heap method
  8. Program for array rotation
  9. Write a program to reverse an array or string
  10. Compute the minimum or maximum of two integers without branching
  11. Reversal algorithm for array rotation
  12. Count Inversions in an array | Set 1 (Using Merge Sort)
  13. Reverse words in a given string
  14. Sort an array of 0s, 1s and 2s
  15. Find Union and Intersection of two unsorted arrays
  16. Find the Minimum length Unsorted Subarray, sorting which makes the complete array sorted
  17. Program for Fibonacci numbers
  18. Next higher number with same number of set bits
  19. Print a given matrix in spiral form
  20. Check if array elements are consecutive | Added Method 3
  21. Search in a row wise and column wise sorted matrix
  22. Count number of occurrences (or frequency) in a sorted array
  23. Given an array arr[], find the maximum j - i such that arr[j] > arr[i]
  24. Longest Increasing Subsequence | DP-3
  25. Find whether an array is subset of another array | Added Method 3
  26. Smallest of three integers without comparison operators
  27. A Boolean Matrix Question
  28. Matrix Chain Multiplication | DP-8
  29. Count total set bits in all numbers from 1 to n
  30. Longest Non-palindromic substring
  31. Coin Change | DP-7
  32. Interleaving of two given strings with no common characters
  33. Activity Selection Problem | Greedy Algo-1
  34. Egg Dropping Puzzle | DP-11
  35. Longest Palindromic Subsequence | DP-12
  36. Boyer Moore Algorithm for Pattern Searching
  37. Find the smallest positive number missing from an unsorted array | Set 1
  38. Longest Bitonic Subsequence | DP-15
  39. Find a sorted subsequence of size 3 in linear time
  40. Palindrome Partitioning | DP-17
  41. Largest subarray with equal number of 0s and 1s
  42. Find a pair with the given difference
  43. XOR of all subarray XORs | Set 2
  44. Generate integer from 1 to 7 with equal probability
  45. Find four elements that sum to a given value | Set 1 (n^3 solution)
  46. Median of two sorted arrays of different sizes
  47. Lexicographic rank of a string
  48. Longest Palindromic Substring | Set 2
  49. Find the number of islands | Set 1 (Using DFS)
  50. Dijkstra's shortest path algorithm | Greedy Algo-7
  51. Binary representation of a given number
  52. Count words in a given string
  53. Zigzag (or diagonal) traversal of Matrix
  54. Minimum insertions to form a palindrome | DP-28
  55. Longest Common Substring | DP-29
  56. Print all possible combinations of r elements in a given array of size n
  57. Find the minimum element in a sorted and rotated array
  58. Print all possible strings of length k that can be formed from a set of n characters
  59. Longest Arithmetic Progression | DP-35
  60. Maximum Product Cutting | DP-36
  61. Move all zeroes to end of array
  62. Count all possible paths from top left to bottom right of a mXn matrix
  63. Rearrange an array so that arr[i] becomes arr[arr[i]] with O(1) extra space
  64. Jump Search
  65. Remove minimum elements from either side such that 2*min becomes more than max
  66. Printing Longest Common Subsequence
  67. Create a matrix with alternating rectangles of O and X
  68. Count Possible Decodings of a given Digit Sequence
  69. Sort an array according to the order defined by another array
  70. Rearrange array in alternating positive & negative items with O(1) extra space | Set 1
  71. Given an n x n square matrix, find sum of all sub-squares of size k x k
  72. Mobile Numeric Keypad Problem
  73. Print all elements in sorted order from row and column wise sorted matrix
  74. K'th Smallest/Largest Element in Unsorted Array | Set 1
  75. Longest Even Length Substring such that Sum of First and Second Half is same
  76. Given a matrix of 'O' and 'X', find the largest subsquare surrounded by 'X'
  77. Given a binary string, count number of substrings that start and end with 1.
  78. Check if a given array contains duplicate elements within k distance from each other
  79. Given a matrix of ‘O’ and ‘X’, replace 'O' with 'X' if surrounded by 'X'
  80. Find length of period in decimal value of 1/n
  81. Find a common element in all rows of a given row-wise sorted matrix
  82. Rearrange an array such that 'arr[j]' becomes 'i' if 'arr[i]' is 'j' | Set 1
  83. How to print maximum number of A's using given four keys
  84. Find the longest substring with k unique characters in a given string
  85. Given a sorted and rotated array, find if there is a pair with a given sum
  86. Count possible ways to construct buildings
  87. Count frequencies of all elements in array in O(1) extra space and O(n) time
  88. Count numbers from 1 to n that have 4 as a digit
  89. Find minimum number of coins that make a given value
  90. Generate all possible sorted arrays from alternate elements of two given sorted arrays
  91. Find a pair with maximum product in array of Integers
  92. Rotate Matrix Elements
  93. Transform One String to Another using Minimum Number of Given Operation
  94. Look-and-Say Sequence
  95. Total number of non-decreasing numbers with n digits
  96. Count of n digit numbers whose sum of digits equals to given sum
  97. Longest Repeating Subsequence
  98. Count even length binary sequences with same sum of first and second half bits
  99. Count number of ways to partition a set into k subsets
  100. Count triplets with sum smaller than a given value
  101. Count number of ways to divide a number in 4 parts
  102. Compute nCr % p | Set 2 (Lucas Theorem)
  103. Find Square Root under Modulo p | Set 1 (When p is in form of 4*i + 3)
  104. Count Inversions of size three in a given array
  105. Longest Span with same Sum in two Binary arrays
  106. Print Concatenation of Zig-Zag String in 'n' Rows
  107. Merge two sorted arrays with O(1) extra space
  108. Find the maximum subset XOR of a given set
  109. Duplicates in an array in O(n) and by using O(1) extra space | Set-2
  110. Find all divisors of a natural number | Set 2
  111. Minimize the maximum difference between the heights
  112. Querying maximum number of divisors that a number in a given range has
  113. Caesar Cipher in Cryptography
  114. Find a specific pair in Matrix
  115. Inplace rotate square matrix by 90 degrees | Set 1
  116. Return previous element in an expanding matrix
  117. Rearrange array in alternating positive & negative items with O(1) extra space | Set 2
  118. Maximum product of a triplet (subsequnece of size 3) in array
  119. K'th Non-repeating Character
  120. Longest Common Prefix using Word by Word Matching
  121. Maximum absolute difference between sum of two contiguous sub-arrays
  122. Longest Common Increasing Subsequence (LCS + LIS)
  123. Find number of subarrays with even sum
  124. LCM of given array elements
  125. Longest Common Prefix using Character by Character Matching
  126. No of Factors of n!
  127. Count number of substrings with exactly k distinct characters
  128. Rearrange positive and negative numbers with constant extra space
  129. Dynamic Programming | High-effort vs. Low-effort Tasks Problem
  130. Find size of the largest '+' formed by all ones in a binary matrix
  131. Print all n-digit numbers whose sum of digits equals to given sum
  132. Print all n-digit numbers with absolute difference between sum of even and odd digits is 1
  133. Find all triplets in a sorted array that forms Geometric Progression
  134. Minimum Cost To Make Two Strings Identical
  135. Find k'th character of decrypted string | Set 1
  136. Find number of times a string occurs as a subsequence in given string
  137. Third largest element in an array of distinct elements
  138. A Space Optimized DP solution for 0-1 Knapsack Problem
  139. Minimum cost to fill given weight in a bag
  140. Check if all bits can be made same by single flip
  141. Find minimum elements after considering all possible transformations
  142. Longest repeating and non-overlapping substring
  143. Pairs of complete strings in two sets of strings
  144. Longest common subsequence with permutations allowed
  145. Sum of all numbers that can be formed with permutations of n digits
  146. Smallest number divisible by first n numbers
  147. Check if a string has all characters with same frequency with one variation allowed
  148. Count All Palindromic Subsequence in a given String
  149. Recursively break a number in 3 parts to get maximum sum
  150. Remove minimum number of characters so that two strings become anagram
  151. Number of flips to make binary string alternate | Set 1
  152. Smallest Palindrome after replacement
  153. Number of swaps to sort when only adjacent swapping allowed
  154. Find maximum difference between nearest left and right smaller elements
  155. Find pairs with given sum such that elements of pair are in different rows
  156. Find next Smaller of next Greater in an array
  157. Find Maximum XOR value of a sub-array of size k
  158. Count All Palindrome Sub-Strings in a String | Set 1
  159. Count pairs in an array that hold i*arr[i] > j*arr[j]
  160. Print matrix in diagonal pattern
  161. Maximum decimal value path in a binary matrix
  162. Minimum characters to be added at front to make string palindrome
  163. Minimum sum of two numbers formed from digits of an array
  164. Subarrays with distinct elements
  165. Move all negative elements to end in order with extra space allowed
  166. Find the highest occurring digit in prime numbers in a range
  167. XOR counts of 0s and 1s in binary representation
  168. Minimum cost to sort strings using reversal operations of different costs
  169. Maximum subarray size, such that all subarrays of that size have sum less than k
  170. Replace every matrix element with maximum of GCD of row or column
  171. Minimum sum subsequence such that at least one of every four consecutive elements is picked
  172. Highest power of 2 less than or equal to given number
  173. Queries on count of points lie inside a circle
  174. Find two prime numbers with given sum
  175. Minimum number of characters to be removed to make a binary string alternate
  176. Check if a string can be obtained by rotating another string 2 places
  177. Check if all rows of a matrix are circular rotations of each other
  178. Compare two integers without using any Comparison operator
  179. Check length of a string is equal to the number appended at its last
  180. Ways to write n as sum of two or more positive integers
  181. LCS (Longest Common Subsequence) of three strings
  182. Probability of Knight to remain in the chessboard
  183. Rearrange an array to minimize sum of product of consecutive pair elements
  184. Find pair with greatest product in array
  185. Divide array into two sub-arrays such that their averages are equal
  186. Find elements which are present in first array and not in second
  187. Sum of matrix in which each element is absolute difference of its row and column numbers
  188. Make two sets disjoint by removing minimum elements
  189. Friends Pairing Problem
  190. Find the missing number in Geometric Progression
  191. Range Queries for Frequencies of array elements
  192. Program for FCFS CPU Scheduling | Set 1
  193. Constant time range add operation on an array
  194. Check if there exist two elements in an array whose sum is equal to the sum of rest of the array
  195. Maximum path sum that starting with any cell of 0-th row and ending with any cell of (N-1)-th row
  196. Minimum operations required to remove an array
  197. Maximize sum of N X N upper left sub-matrix from given 2N X 2N matrix
  198. Count of words whose i-th letter is either (i-1)-th, i-th, or (i+1)-th letter of given word
  199. Print a matrix in alternate manner (left to right then right to left)
  200. Number of subsequences in a string divisible by n
  201. Finding the maximum square sub-matrix with all equal elements
  202. Minimum operations required to set all elements of binary matrix
  203. Print matrix in antispiral form
  204. Find floor and ceil in an unsorted array
  205. Nearest element with at-least one common prime factor
  206. Subset with no pair sum divisible by K
  207. Conditionally assign a value without using conditional and arithmetic operators
  208. Sort all even numbers in ascending order and then sort all odd numbers in descending order
  209. Recursive Insertion Sort
  210. Rotate a matrix by 90 degree without using any extra space | Set 2
  211. Highway Billboard Problem
  212. Count all perfect divisors of a number
  213. Sum of two large numbers
  214. Make n using 1s and 2s with minimum number of terms multiple of k
  215. Count of strings that can be formed using a, b and c under given constraints
  216. Maximum consecutive repeating character in string
  217. Construct an array from XOR of all elements of array except element at same index
  218. Difference of two large numbers
  219. Replace all occurrences of string AB with C without using extra space
  220. Prime points (Points that split a number into two primes)
  221. Character replacement after removing duplicates from a string
  222. Lexicographically first palindromic string
  223. Number of subsequences of the form a^i b^j c^k
  224. Sum of nodes at k-th level in a tree represented as string
  225. Find an equal point in a string of brackets
  226. Count Divisors of n in O(n^1/3)
  227. Check if frequency of all characters can become same by one removal
  228. Find the first repeated character in a string
  229. Largest number smaller than or equal to n and digits in non-decreasing order
  230. Circular Matrix (Construct a matrix with numbers 1 to m*n in spiral way)
  231. Largest sum Zigzag sequence in a matrix
  232. Check if a string follows a^nb^n pattern or not
  233. Find maximum height pyramid from the given array of objects
  234. Minimum cost for acquiring all coins with k extra coins allowed with every coin
  235. Smallest length string with repeated replacement of two distinct adjacent
  236. Different substrings in a string that start and end with given strings
  237. Insertion Sort
  238. Merge Sort
  239. Bubble Sort
  240. Program to cyclically rotate an array by one
  241. Given a number as a string, find the number of contiguous subsequences which recursively add up to 9
  242. Check if characters of a given string can be rearranged to form a palindrome
  243. Replace every array element by multiplication of previous and next
  244. Check if two numbers are equal without using arithmetic and comparison operators
  245. Minimum number of deletions to make a string palindrome
  246. Clustering/Partitioning an array such that sum of square differences is minimum
  247. Binary representation of next number
  248. Generate k digit numbers with digits in strictly increasing order
  249. Given a number n, find the first k digits of n^n
  250. Collect all coins in minimum number of steps
  251. Minimum steps to delete a string after repeated deletion of palindrome substrings
  252. Count the number of ways to divide an array into three contiguous parts having equal sum
  253. Sort an array after applying the given equation
  254. Count number of ways to jump to reach end
  255. Largest subset whose all elements are Fibonacci numbers
  256. K-th Element of Two Sorted Arrays
  257. Print common characters of two Strings in alphabetical order
  258. An efficient way to check whether n-th Fibonacci number is multiple of 10
  259. Print array of strings in sorted order without copying one string into another
  260. Queries for GCD of all numbers of an array except elements in a given range
  261. Find the n-th number made of even digits only
  262. Print all distinct characters of a string in order (3 Methods)
  263. Minimum number of jumps to reach end | Set 2 (O(n) solution)
  264. Merge two sorted arrays
  265. Closest (or Next) smaller and greater numbers with same number of set bits
  266. Largest sum subarray with at-least k numbers
  267. Rearrange an array such that every odd indexed element is greater than it previous
  268. Sum of product of all pairs of array elements
  269. Print a String in wave pattern
  270. Find sum of digits in factorial of a number
  271. Longest Bitonic Subsequence in O(n log n)
  272. Find Index of 0 to be replaced with 1 to get longest continuous sequence of 1s in a binary array | Set-2
  273. Numbers whose factorials end with n zeros
  274. Split numeric, alphabetic and special symbols from a String
  275. Program to print factors of a number in pairs
  276. String containing first letter of every word in a given string with spaces
  277. Count elements less than or equal to a given value in a sorted rotated array
  278. Longest Common Prefix using Sorting
  279. Number of integral solutions of the equation x1 + x2 +.... + xN = k
  280. Maximizing Unique Pairs from two arrays
  281. Recursive Programs to find Minimum and Maximum elements of array
  282. Given GCD G and LCM L, find number of possible pairs (a, b)
  283. Find minimum value to assign all array elements so that array product becomes greater
  284. Divide large number represented as string
  285. Count pairs (a, b) whose sum of cubes is N (a^3 + b^3 = N)
  286. Count pairs from two sorted arrays whose sum is equal to a given value x
  287. Rearrange a string in sorted order followed by the integer sum
  288. Painting Fence Algorithm
  289. Printing Items in 0/1 Knapsack
  290. Implementing ternary operator without any conditional statement
  291. Replace every element of the array with BitWise XOR of all other
  292. Find a pair of elements swapping which makes sum of two arrays same
  293. Quickly find multiple left rotations of an array | Set 1
  294. Count number of strings (made of R, G and B) using given combination
  295. Lexicographically smallest rotated sequence | Set 2
  296. Count pairs with Odd XOR
  297. Efficiently check whether n is a multiple of 4 or not
  298. Queries for decimal values of subarrays of a binary array
  299. Count of subarrays whose products don't have any repeating prime factor
  300. Maximum product of subsequence of size k
  301. Count quadruples from four sorted arrays whose sum is equal to a given value x
  302. Given a number as a string, find the number of contiguous subsequences which recursively add up to 9 | Set 2
  303. Check if both halves of the string have same set of characters
  304. Nth Even length Palindrome
  305. Quick way to check if all the characters of a string are same
  306. Program to print solid and hollow rhombus patterns
  307. Maximum length substring having all same characters after k changes
  308. Min flips of continuous characters to make all characters same in a string
  309. Print last k digits of a^b (a raised to power b)
  310. Shuffle 2n integers in format {a1, b1, a2, b2, a3, b3, ......, an, bn} without using extra space
  311. String which when repeated exactly K times gives a permutation of S
  312. Check if array elements are consecutive in O(n) time and O(1) space (Handles Both Positive and negative numbers)
  313. Number of times a number can be replaced by the sum of its digits until it only contains one digit
  314. Rotate a Matrix by 180 degree
  315. Maximize a given unsigned number number by swapping bits at it's extreme positions.
  316. Find repeated character present first in a string
  317. Find a string such that every character is lexicographically greater than its immediate next character
  318. Print a given matrix in zigzag form
  319. Count of occurrences of a "1(0+)1" pattern in a string
  320. Sentence Palindrome (Palindrome after removing spaces, dots, .. etc)
  321. Find maximum number that can be formed using digits of a given number
  322. Insert minimum number in array so that sum of array becomes prime
  323. Maximum sum subarray having sum less than or equal to given sum
  324. Compute average of two numbers without overflow
  325. Check if a large number can be divided into two or more segments of equal sum
  326. Smallest number that never becomes negative when processed against array elements
  327. Maximum sum of lengths of non-overlapping subarrays with k as the max element.
  328. Print matrix in snake pattern
  329. Print the longest common substring
  330. Efficiently find first repeated character in a string without using any additional data structure in one traversal
  331. Print a matrix in a spiral form starting from a point
  332. Print characters and their frequencies in order of occurrence
  333. Minimum Number of Manipulations required to make two Strings Anagram Without Deletion of Character
  334. Least number of manipulations needed to ensure two strings have identical characters
  335. Shortest possible combination of two strings
  336. Count subarrays with equal number of occurrences of two given elements
  337. Maximise the size of consecutive element subsets in an array
  338. Longest Common Substring in an Array of Strings
  339. Sort first half in ascending and second half in descending order | 1
  340. Length of the smallest sub-string consisting of maximum distinct characters
  341. Find the n-th number whose binary representation is a palindrome
  342. Longest subsequence where every character appears at-least k times
  343. Longest Subarray having sum of elements atmost 'k'
  344. Count number of paths whose weight is exactly X and has at-least one edge of weight M
  345. Move all negative numbers to beginning and positive to end with constant extra space
  346. Find an element in array such that sum of left array is equal to sum of right array
  347. Maximum sum bitonic subarray
  348. Check if a number is power of 8 or not
  349. Sort an array according to absolute difference with a given value "using constant extra space"
  350. Count all triplets whose sum is equal to a perfect cube
  351. Positive elements at even and negative at odd positions (Relative order not maintained)
  352. Lexicographically smallest permutation of {1, .. n} such that no. and position do not match
  353. Efficiently merging two sorted arrays with O(1) extra space
  354. Number of substrings with count of each character as k
  355. Check whether all the bits are unset in the given range or not
  356. Number of steps required to convert a binary number to one
  357. Check if it is possible to reach vector B by rotating vector A and adding vector C to it
  358. Maximum area rectangle by picking four sides from array
  359. Print all palindromic paths from top left to bottom right in a matrix
  360. Split the array and add the first part to the end
  361. Remove array end element to maximize the sum of product
  362. Value of continuous floor function : F(x) = F(floor(x/2)) + x
  363. Minimum move to end operations to make all strings equal
  364. Generate two output strings depending upon occurrence of character in input string.
  365. Tribonacci Numbers
  366. Maximum difference between group of k-elements and rest of the array.
  367. To check whether a large number is divisible by 7
  368. Make a string from another by deletion and rearrangement of characters
  369. Maximum Possible Product in Array after performing given Operations
  370. Count of alphabets having ASCII value less than and greater than k
  371. Number of closing brackets needed to complete a regular bracket sequence
  372. Minimum and Maximum sum of absolute differences of pairs
  373. Check if a string is suffix of another
  374. Queries to count the number of unordered co-prime pairs from 1 to N
  375. Rearrange array such that even index elements are smaller and odd index elements are greater
  376. Longest alternating sub-array starting from every index in a Binary Array
  377. Longest Repeated Subsequence
  378. Minimal operations to make a number magical
  379. Number of positions where a letter can be inserted such that a string becomes palindrome
  380. Queries on probability of even or odd number in given ranges
  381. Minimum cost to connect weighted nodes represented as array
  382. Count numbers in range such that digits in it and it's product with q are unequal
  383. k size subsets with maximum difference d between max and min
  384. Shuffle array {a1, a2, .. an, b1, b2, .. bn} as {a1, b1, a2, b2, a3, b3, ……, an, bn} without using extra space
  385. Program for Mean and median of an unsorted array
  386. Length of Longest Balanced Subsequence
  387. Pairs of Positive Negative values in an array
  388. Pair with maximum GCD from two arrays
  389. String with k distinct characters and no same characters adjacent
  390. Print digit's position to be removed to make a number divisible by 6
  391. Count of strings that can be formed from another string using each character at-most once
  392. Number of steps to convert to prime factors
  393. Sum of all the prime divisors of a number
  394. Program to sort string in descending order
  395. Lexicographically smallest permutation with distinct elements using minimum replacements
  396. Count of triangles with total n points with m collinear
  397. Print words of a string in reverse order
  398. Smallest subarray with k distinct numbers
  399. Replace a character c1 with c2 and c2 with c1 in a string S
  400. Longest subarray not having more than K distinct elements
  401. Minimum replacements to make elements of a ternary array same
  402. Given a large number, check if a subsequence of digits is divisible by 8
  403. Printing string in plus ‘+’ pattern in the matrix
  404. Check if a large number is divisible by 13 or not
  405. Find minimum shift for longest common prefix
  406. Construct lexicographically smallest palindrome
  407. Program to find the minimum (or maximum) element of an array
  408. Sums of ASCII values of each word in a sentence
  409. Count occurrences of a word in string
  410. K-Primes (Numbers with k prime factors) in a range
  411. Number of palindromic subsequences of length k where k <= 3
  412. Probability of choosing a random pair with maximum sum in an array
  413. Longest Increasing Odd Even Subsequence
  414. Check whether second string can be formed from characters of first string
  415. Length of longest increasing circular subarray
  416. Queries on XOR of XORs of all subarrays
  417. Maximum sum of pairwise product in an array with negative allowed
  418. Different ways to sum n using numbers greater than or equal to m
  419. Maximum product of 4 adjacent elements in matrix
  420. Maximum product of an increasing subsequence
  421. Minimum Cost to make two Numeric Strings Identical
  422. Minimum operations required to make each row and column of matrix equals
  423. Print given sentence into its equivalent ASCII form
  424. Longest Common Anagram Subsequence
  425. Maximum occurring character in an input string | Set-2
  426. Rearrange array such that arr[i] >= arr[j] if i is even and arr[i]<=arr[j] if i is odd and j < i
  427. Program to print the pattern ‘D’
  428. Program to calculate area of a Tetrahedron
  429. Check if a given string is made up of two alternating characters
  430. Minimum array element changes to make its elements 1 to N
  431. Check if both halves of the string have at least one different character
  432. Reduce Hamming distance by swapping two characters
  433. Distance between two points travelled by a boat
  434. Count consonants in a string (Iterative and recursive methods)
  435. Create a new string by alternately combining the characters of two halves of the string in reverse
  436. Reversal algorithm for right rotation of an array
  437. Stable sort for descending order
  438. Check if it is possible to transform one string to another
  439. Space efficient iterative method to Fibonacci number
  440. Maximum distinct lowercase alphabets between two uppercase
  441. Interchange elements of first and last rows in matrix
  442. Sort the matrix row-wise and column-wise
  443. Convert a sentence into its equivalent mobile numeric keypad sequence
  444. Sum of all subsequences of a number
  445. Squares of numbers with repeated single digits | Set 1 (3, 6 and 9)
  446. Sorting rows of matrix in ascending order followed by columns in descending order
  447. Sorting array with conditional swapping
  448. Find the slope of the given number
  449. Check if two strings have a common substring
  450. Sort 1 to N by swapping adjacent elements
  451. Maximum of sum and product of digits until number is reduced to a single digit
  452. Expressing factorial n as sum of consecutive numbers
  453. Reverse Diagonal elements of matrix
  454. Maximum Product Subarray | Added negative product case
  455. Reach A and B by multiplying them with K and K^2 at every step
  456. Center element of matrix equals sums of half diagonals
  457. Minimum Sum Path in a Triangle
  458. Count subarrays with same even and odd elements
  459. Find duplicates in constant array with elements 0 to N-1 in O(1) space
  460. Check if characters of one string can be swapped to form other
  461. Count substrings with each character occurring at most k times
  462. Number of subarrays having sum less than K
  463. Check whether a very large number of the given form is a multiple of 3.
  464. Maximum elements that can be made equal with k updates
  465. Maximum possible difference of two subsets of an array
  466. Levelwise Alternating OR and XOR operations in Segment Tree
  467. Ways to split string such that each partition starts with distinct character
  468. Check if it possible to partition in k subarrays with equal sum
  469. Program to find N-th term of the series a, b, b, c, c, c,.......
  470. Maximum sum of absolute difference of an array
  471. Median of two sorted arrays with different sizes in O(log(min(n, m)))
  472. Number of common base strings for two strings
  473. Print longest palindrome word in a sentence
  474. Program for scalar multiplication of a matrix
  475. Maximum sum increasing subsequence from a prefix and a given element after prefix is must
  476. Count numbers formed by given two digit with sum having given digits
  477. Two Dimensional Segment Tree | Sub-Matrix Sum
  478. Sum of bitwise OR of all possible subsets of given set
  479. Lexicographically smallest string obtained after concatenating array
  480. Check if a string is substring of another
  481. Program to print Collatz Sequence
  482. Program to display all alphabets from A to Z in uppercase and lowercase both
  483. Program to print all the numbers divisible by 3 and 5 for a given number
  484. Longest substring having K distinct vowels
  485. Minimum operations to make GCD of array a multiple of k
  486. Check if every index i has an index j such that sum of elements in both directions are equal
  487. Longest substring of 0s in a string formed by k concatenations
  488. Program to reverse a string (Iterative and Recursive)
  489. Check for balanced parentheses in an expression | O(1) space
  490. Triplets in array with absolute difference less than k
  491. Check if a number can be expressed as a^b | Set 2
  492. Ways to choose three points with distance between the most distant points <= L
  493. Sum of product of r and rth Binomial Coefficient (r * nCr)
  494. Number of digits in N factorial to the power N
  495. Word Wrap problem ( Space optimized solution )
  496. Maximum product quadruple (sub-sequence of size 4) in array
  497. Check whether the number formed by concatenating two numbers is a perfect square or not
  498. Subsequence of size k with maximum possible GCD
  499. Longest subarray such that adjacent elements have at least one common digit | Set 1
  500. Maximum value in a matrix which contain intersecting concentric submatrix
  501. In-Place Algorithm
  502. Highest power of two that divides a given number
  503. Minimum splits in a binary string such that every substring is a power of 4 or 6.
  504. Longest Decreasing Subsequence
  505. Queries for number of array elements in a range with Kth Bit Set
  506. Recursive program to generate power set
  507. Number which has the maximum number of distinct prime factors in the range M to N
  508. Find the smallest positive number missing from an unsorted array | Set 2
  509. Maximum Product Subarray | Set 3
  510. Find longest length number in a string
  511. Puzzle | Minimum distance for Lizard
  512. Find Largest Special Prime which is less than or equal to a given number
  513. Maximize the number of segments of length p, q and r
  514. Degree of a Cycle Graph
  515. kth smallest/largest in a small range unsorted array
  516. Memoization (1D, 2D and 3D)
  517. Minimum positive integer required to split the array equally
  518. Find i’th index character in a binary string obtained after n iterations | Set 2
  519. Previous greater element
  520. Permutation of a string with maximum number of characters greater than its adjacent characters
  521. Replace every element with the greatest element on its left side
  522. Sum of array elements excluding the elements which lie between a and b
  523. Spiral Pattern
  524. Longest Common Prefix Matching | Set-6
  525. Print all prime numbers less than or equal to N
  526. Number of Counterclockwise shifts to make a string palindrome
  527. Replace every character of string by character whose ASCII value is K times more than it
  528. Longest Common Subsequence | DP using Memoization
  529. Edit distance and LCS (Longest Common Subsequence)
  530. Find index of first occurrence when an unsorted array is sorted
  531. Sudo Placement[1.5] | Second Smallest in Range
  532. Program to find equation of a plane passing through 3 points
  533. Check if it is possible to create a polygon with a given angle
  534. Distance between a point and a Plane in 3 D
  535. Haversine formula to find distance between two points on a sphere
  536. Program to print numeric pattern | Set - 2
  537. Angle between two Planes in 3D
  538. Average of ASCII values of characters of a given string
  539. Minimum cost to reach the top of the floor by climbing stairs
  540. Sum of all prime divisors of all the numbers in range L-R
  541. Print the corner elements and their sum in a 2-D matrix
  542. Sort first half in ascending and second half in descending order | Set 2
  543. Number of subarrays having sum in a given range
  544. Lexicographically middle string
  545. Distance between two parallel Planes in 3-D
  546. Number of sub arrays with odd sum
  547. Longest Subarray with first element greater than or equal to Last element
  548. Remove all occurrences of a character in a string
  549. Segregating negative and positive maintaining order and O(1) space
  550. Find gcd(a^n, c) where a, n and c can vary from 1 to 10^9
  551. Matrix sum except one item
  552. Maximum sum in circular array such that no two elements are adjacent
  553. Program to find last two digits of 2^n
  554. Number of ways to represent a number as sum of k fibonacci numbers
  555. Check if bits in range L to R of two numbers are complement of each other or not
  556. Probability of a key K present in array
  557. Surd number
  558. Count pairs with Bitwise OR as Even number
  559. Check if a Matrix is Invertible
  560. Inserting M into N such that m starts at bit j and ends at bit i | Set-2
  561. Minimize the difference between minimum and maximum elements
  562. Convert time from 24 hour clock to 12 hour clock format
  563. First element greater than or equal to X in prefix sum of N numbers using Binary Lifting
  564. Check if a key is present in every segment of size k in an array
  565. Number of integral solutions for equation x = b*(sumofdigits(x)^a)+c
  566. Intersecting rectangle when bottom-left and top-right corners of two rectangles are given
  567. Check if a point lies on or inside a rectangle | Set-2
  568. Check if max occurring character of one string appears same no. of times in other
  569. Longest subarray such that the difference of max and min is at-most one
  570. Even digits Sum and Odd digits sum divisible by 4 and 3 respectively
  571. Program to Print the Trapezium Pattern
  572. Cut all the rods with some length such that the sum of cut-off length is maximized
  573. Number of possible pairs of Hypotenuse and Area to form right angled triangle
  574. Print the last occurrence of elements in array in relative order
  575. Subtraction of two numbers using 2's Complement
  576. Count strings with consonants and vowels at alternate position
  577. Maximum number of dots after throwing a dice N times
  578. Number of chocolates left after k iterations
  579. Program to find Nth term in the series 0, 0, 2, 1, 4, 2, 6, 3, 8,...
  580. Check if the characters in a string form a Palindrome in O(1) extra space
  581. Minimum number of changes required to make the given array an AP
  582. Alternate Primes till N
  583. Count numbers which can be represented as sum of same parity primes
  584. Program for incrementing/decrementing triangle pattern
  585. Maximum set bit sum in array without considering adjacent elements
  586. Longest subarray having average greater than or equal to x | Set-2
  587. Find the largest number that can be formed with the given digits
  588. N-th term in the series 1, 11, 55, 239, 991,....
  589. Elements that occurred only once in the array
  590. Count elements in the given range which have maximum number of divisors
  591. Balanced expressions such that given positions have opening brackets | Set 2
  592. Minimum element in a max heap
  593. Count number of triplets with product equal to given number | Set 2
  594. Rotate a matrix by 90 degree in clockwise direction without using any extra space
  595. Fascinating Number
  596. Numbers with sum of digits equal to the sum of digits of its all prime factor
  597. Program to find Nth term in the series 0, 2, 1, 3, 1, 5, 2, 7, 3,…
  598. Ways to place K bishops on an N×N chessboard so that no two attack
  599. Check if Decimal representation of an Octal number is divisible by 7
  600. Median of two sorted arrays of different sizes | Set 1 (Linear)
  601. Sort first k values in ascending order and remaining n-k values in descending order
  602. Minimum number of square tiles required to fill the rectangular floor
  603. Maximize the profit by selling at-most M products
  604. Program to check if an array is bitonic or not
  605. Find Nth term of series 1, 4, 15, 72, 420...
  606. Program to check whether 4 points in a 3-D plane are Coplanar
  607. Count number of triplets with product equal to given number with duplicates allowed
  608. Find Nth term of the series 5, 13, 25, 41, 61...
  609. Check whether a given point lies on or inside the rectangle | Set 3
  610. Program to find the Nth term of series 5, 10, 17, 26, 37, 50, 65, 82, ...
  611. Program to find the Nth term of series 0, 4, 14, 30, 51, 80, 114, 154, 200, ...
  612. Number of divisors of a given number N which are divisible by K
  613. Number of substrings of one string present in other
  614. Length of longest common subsequence containing vowels
  615. Program to count number of distinct Squares and Cubes upto N
  616. Coin game of two corners (Greedy Approach)
  617. Distinct Prime Factors of Array Product
  618. Check if a number with even number of digits is palindrome or not
  619. Find area of parallelogram if vectors of two adjacent sides are given
  620. Print elements that can be added to form a given sum
  621. Program to find the Nth term of the series 0, 5, 14, 27, 44, ........
  622. Calculate the total fine to be collected
  623. Find Nth term of the series 1, 8, 54, 384...
  624. Find Nth term of the series 1, 1, 2, 6, 24...
  625. Check if subarray with given product exists in an array
  626. Replace every element of the array by sum of all other elements
  627. Program to calculate Profit Or Loss
  628. Sum of Area of all possible square inside a rectangle
  629. Check if a String can be converted to Pangram in K changes
  630. Check if a number is divisible by 23 or not
  631. Check if a number is divisible by 41 or not
  632. Find the maximum sum of Plus shape pattern in a 2-D array
  633. Maximum number of pieces in N cuts
  634. Program to find Sum of the series 1*3 + 3*5 + ....
  635. For each element in 1st array count elements less than or equal to it in 2nd array | Set 2
  636. Program to find Length of Bridge using Speed and Length of Train
  637. Find four factors of N with maximum product and sum equal to N
  638. Minimum number of elements to be removed to make XOR maximum
  639. Smallest square formed with given rectangles
  640. Minimum squares to cover a rectangle
  641. Check if the given chessboard is valid or not
  642. Check if any large number is divisible by 17 or not
  643. Program to find the head start in a race
  644. Minimum length of the shortest path of a triangle
  645. Sum of Factors of a Number using Prime Factorization
  646. Largest rectangle that can be inscribed in a semicircle
  647. The biggest possible circle that can be inscribed in a rectangle
  648. Maximum occurred integer in n ranges | Set-2
  649. Queries to check if it is possible to join boxes in a circle
  650. Find a point such that sum of the Manhattan distances is minimized
  651. Area of circle inscribed within rhombus
  652. Program to calculate Root Mean Square
  653. Find the sum of series 0.X + 0.XX + 0.XXX +... upto k terms
  654. Program to find the quantity after mixture replacement
  655. Area of a largest square fit in a right angle triangle
  656. Longest Subarray with Sum greater than Equal to Zero
  657. Minimum Players required to win the game
  658. Program to find total number of edges in a Complete Graph
  659. Find bitwise AND (&) of all possible sub-arrays
  660. Minimum changes required to make two arrays identical
  661. Find bitwise OR of all possible sub-arrays
  662. Product of 2 numbers using recursion | Set 2
  663. Largest triangle that can be inscribed in a semicircle
  664. Find the sum of the series 2, 5, 13, 35, 97...
  665. Find maximum points which can be obtained by deleting elements from array
  666. Largest square that can be inscribed in a semicircle
  667. Length of longest rod that can fit into a cuboid
  668. Largest trapezoid that can be inscribed in a semicircle
  669. Count common subsequence in two strings
  670. Perfect cube greater than a given number
  671. Count pairs (a, b) whose sum of squares is N (a^2 + b^2 = N)
  672. Count the number of ways to traverse a Matrix
  673. Check if lowercase and uppercase characters are in same order
  674. Largest triangle that can be inscribed in an ellipse
  675. Program to print elements of a Matrix row-wise skipping alternate elements
  676. Program to find the Volume of an irregular tetrahedron
  677. Divide a number into two parts such that sum of digits is maximum
  678. Find sum of product of number in given series
  679. Find area of triangle if two vectors of two adjacent sides are given
  680. 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)
  681. Program to find Nth term of the series 2, 4, 3, 4, 15...
  682. Ratio of mth and nth term in an Arithmetic Progression (AP)
  683. Program to find the Hidden Number
  684. Find other two sides and angles of a right angle triangle
  685. Replace every character of a string by a different character
  686. Program to find Circuit Rank of an Undirected Graph
  687. Check if two arrays are permutations of each other using Mathematical Operation
  688. Check if a point is inside, outside or on the ellipse
  689. Program to find the product of ASCII values of characters in a string
  690. Program to find the value of tan(nΘ)
  691. Program to find N-th term of series 3, 5, 33, 35, 53....
  692. Program to find the value of sin(nΘ)
  693. First triangular number whose number of divisors exceeds N
  694. Count number of integers less than or equal to N which has exactly 9 divisors
  695. Find an element in an array such that elements form a strictly decreasing and increasing sequence
  696. Find the count of maximum contiguous Even numbers
  697. Minimum cost to buy N kilograms of sweet for M persons
  698. Program to find the N-th term of series 3, 5, 33, 35, 53…. | Set-2
  699. Maximum Sum of Products of Two Arrays
  700. Minimum odd cost path in a matrix
  701. Set the rightmost off bit
  702. Generating numbers that are divisor of their right-rotations
  703. Program to find the Centroid of the triangle
  704. Number of Co-prime pairs from 1 to N with product equals to N
  705. Sum of the first N terms of the series 5,12, 23, 38....
  706. Find the GCD of N Fibonacci Numbers with given Indices
  707. Number of unique permutations starting with 1 of a Binary String
  708. Program to print the series 2, 1, 4, 3, 6, 5, .... up to N terms
  709. Numbers less than N which are product of exactly two distinct prime numbers
  710. Total number of different staircase that can made from N boxes
  711. Ways to write N as sum of two or more positive integers | Set-2
  712. Count the number of carry operations required to add two numbers
  713. Number of values of b such that a = b + (a^b)
  714. Minimum increment in the sides required to get non-negative area of a triangle
  715. Find two distinct prime numbers with given product
  716. Find the altitude and area of an isosceles triangle
  717. Program to find the surface area of the square pyramid
  718. Program to find Nth term of series 0, 7, 18, 33, 51, 75, 102, 133, .....
  719. Program to find Nth term of series 0, 10, 30, 60, 99, 150, 210, 280...........
  720. Program to find Nth term of series 2, 12, 28, 50, 77, 112, 152, 198, .....
  721. Program to find Nth term of series 4, 14, 28, 46, 68, 94, 124, 158, .....
  722. Program to find Nth term of series 0, 9, 22, 39, 60, 85, 114, 147, .....
  723. Program to find Nth term of series 1, 6, 17, 34, 56, 86, 121, 162, .......
  724. Program to find Nth term of series 3, 12, 29, 54, 86, 128, 177, 234, .....
  725. Program to check if an array is palindrome or not using Recursion
  726. Program to find the common ratio of three numbers
  727. Program to calculate the value of nCr Efficiently
  728. Find the direction from given string
  729. Program to find remainder when large number is divided by r
  730. Check if an array is Wave Array
  731. Number of balanced bracket subsequence of length 2 and 4
  732. Replace minimal number of characters to make all characters pair wise distinct
  733. Count Numbers with N digits which consists of odd number of 0's
  734. Rearrange the string to maximize the number of palindromic substrings
  735. Number of solutions of n = x + n ⊕ x
  736. Find pair with maximum difference in any column of a Matrix
  737. Absolute difference between sum and product of roots of a quartic equation
  738. Find the largest good number in the divisors of given number N
  739. Sum of first N natural numbers by taking powers of 2 as negative number
  740. Check if it is possible to move from (a, 0) to (b, 0) with given jumps
  741. Count all the numbers less than 10^6 whose minimum prime factor is N
  742. Product of all primes in the range from L to R
  743. Check whether bitwise AND of a number with any subset of an array is zero or not
  744. Check if it is possible to sort the array after rotating it
  745. Program to find the Nth number of the series 2, 10, 24, 44, 70.....
  746. Construct a frequency array of digits of the values obtained from x^1, x^2, ........, x^n
  747. Find N digits number which is divisible by D
  748. Maximum removal from array when removal time >= waiting time
  749. Find the value of max(f(x)) - min(f(x)) for a given F(x)
  750. Sum of alternate elements of a N x N matrix
  751. Meta Binary Search | One-Sided Binary Search
  752. Program to print the Cot Bed Pattern
  753. Number of ways to choose a pair containing an even and an odd number from 1 to N
  754. Check if a cell can be visited more than once in a String
  755. Find the number of rectangles of size 2*1 which can be placed inside a rectangle of size n*m
  756. Find Sum of pair from two arrays with maximum sum
  757. Sum of all the prime numbers in a given range
  758. Product of all the elements in an array divisible by a given number K
  759. Check if a string can be rearranged to form special palindrome
  760. Program to find the maximum element in a Matrix
  761. Check whether the given number is Euclid Number or not
  762. Minimum number of digits to be removed so that no two consecutive digits are same
  763. Generate a number such that the frequency of each digit is digit times the frequency in given number
  764. Smallest Integer to be inserted to have equal sums
  765. Find the unit place digit of sum of N factorials
  766. Count all the numbers in a range with smallest factor as K
  767. Program to print the pattern with two hollow Triangles
  768. Count pairs (i,j) such that (i+j) is divisible by A and B both
  769. Longest Subsequence with at least one common digit in every element
  770. Value of the series (1^3 + 2^3 + 3^3 + ... + n^3) mod 4 for a given n
  771. Pair with given sum in matrix
  772. Check if a pair with given product exists in a Matrix
  773. Minimum increment operations to make the array in increasing order
  774. Check if a large number is divisible by 2, 3 and 5 or not
  775. Sum of squares of Fibonacci numbers
  776. Find last two digits of sum of N factorials
  777. Sum of Fibonacci Numbers with alternate negatives
  778. Program to print Hut Star pattern
  779. Numbers in range [L, R] such that the count of their divisors is both even and prime
  780. Difference between the largest and the smallest primes in an array
  781. Find Sum of Series 1^2 - 2^2 + 3^2 - 4^2 ..... upto n terms
  782. Product of all pairwise consecutive elements in an Array
  783. Minimum number of segments required such that each segment has distinct elements
  784. Number of distinct integers obtained by lcm(X, N)/X
  785. Minimum number of Parentheses to be added to make it valid
  786. Print values of 'a' in equation (a+b) <= n and a+b is divisible by x
  787. Number of groups of magnets formed from N magnets
  788. Sum and Product of minimum and maximum element of an Array
  789. Find Tangent at a given point on the curve
  790. Check whether a binary string can be formed by concatenating given N numbers sequentially
  791. Minimum number of towers required such that every house is in the range of at least one tower
  792. Find the longest common prefix between two strings after performing swaps on second string
  793. Number of permutations of a string in which all the occurrences of a given character occurs together
  794. Number of squares of side length required to cover an N*M rectangle
  795. Check if the characters of a given string are in alphabetical order
  796. Largest element in the array that is repeated exactly k times
  797. Program to find the Sum of each Row and each Column of a Matrix
  798. Sub-strings of length K containing same character
  799. K- Fibonacci series
  800. Find if a molecule can be formed from 3 atoms using their valence numbers
  801. Count numbers whose XOR with N is equal to OR with N
  802. Minimum and Maximum element of an array which is divisible by a given number k
  803. Minimum time to reach a point with +t and -t moves at time t
  804. Number of anomalies in an array
  805. Check if all the palindromic sub-strings are of odd length
  806. N-th character in the string made by concatenating natural numbers
  807. Lexicographically largest string formed from the characters in range L and R
  808. Print array elements in alternatively increasing and decreasing order
  809. Replace repeating elements with greater that greatest values
  810. Remove characters that appear more than k times
  811. Largest factor of a given number which is a perfect square
  812. Remove characters from string that appears strictly less than K times
  813. Check if any permutation of N equals any power of K
  814. Check if it is possible to rearrange a binary string with alternate 0s and 1s
  815. Minimum squares to evenly cut a rectangle
  816. Replace duplicates with greater than previous duplicate value
  817. Program to find count of numbers having odd number of divisors in given range
  818. Find the foot of perpendicular of a point in a 3 D plane
  819. Check if a number is a Mystery Number
  820. Replace every element of the array by product of all other elements
  821. Replace every array element by sum of previous and next
  822. Find time taken for signal to reach all positions in a string
  823. Maximum points of intersection n lines
  824. Sum of width (max and min diff) of all Subsequences
  825. Problem of 8 Neighbours of an element in a 2-D Matrix
  826. Convert all lowercase characters to uppercase whose ASCII value is co-prime with k
  827. Find maximum value of x such that n! % (k^x) = 0
  828. Product of every K’th prime number in an array
  829. Number of ways to partition a string into two balanced subsequences
  830. Check whether sum of digits at odd places of a number is divisible by K
  831. Lexicographically smallest string formed by removing at most one character
  832. Check whether it is possible to make both arrays equal by modifying a single element
  833. Minimum number of operations required to reduce N to 1
  834. Find single Movement in a Matrix
  835. Absolute Difference of all pairwise consecutive elements in an array
  836. Number of triangles formed from a set of points on three lines
  837. Minimum number of operations required to delete all elements of the array
  838. Replace every array element by Bitwise Xor of previous and next element
  839. Longest subarray with elements having equal modulo K
  840. N digit numbers divisible by 5 formed from the M digits
  841. Replace every element with the smallest element on its left side
  842. Number of cells in the right and left diagonals passing through (x, y) in a matrix
  843. Minimum steps to remove substring 010 from a binary string
  844. Check whether (i,j) exists such that arr[i] != arr[j] and arr[arr[i]] is equal to arr[arr[j]]
  845. Count number less than N which are product of perfect squares
  846. Check if the Xor of the frequency of all digits of a number N is zero or not
  847. Lexicographically smallest permutation with no digits at Original Index
  848. Smallest odd digits number not less than N
  849. Count and Print the alphabets having ASCII value in the range [l, r]
  850. Count the number of vowels occurring in all the substrings of given string
  851. Check if any permutation of a number is divisible by 3 and is Palindromic
  852. Maximum sum and product of the M consecutive digits in a number
  853. Find the count of palindromic sub-string of a string in its sorted form
  854. Index with Minimum sum of prefix and suffix sums in an Array
  855. Partition an array such into maximum increasing segments
  856. Find if array has an element whose value is half of array sum
  857. GCD of a number raised to some power and another number
  858. Minimum cuts required to divide the Circle into equal parts
  859. Find the count of Strictly decreasing Subarrays
  860. Count and Print the alphabets having ASCII value not in the range [l, r]
  861. Count the number of words having sum of ASCII values less than and greater than k
  862. Print each word in a sentence with their corresponding average of ASCII values
  863. Check whether product of digits at even places is divisible by sum of digits at odd place of a number
  864. Find the count of substrings in alphabetic order
  865. Minimum number of cuts required to make circle segments equal sized
  866. Minimum deletions from string to reduce it to string with at most 2 unique characters
  867. Game of stones
  868. Find the value of f(n) / f(r) * f(n-r)
  869. Probability of getting two consecutive heads after choosing a random coin among two different types of coins
  870. Find the index of the left pointer after possible moves in the array
  871. Check if a prime number can be expressed as sum of two Prime Numbers
  872. Print a case where the given sorting algorithm fails
  873. Largest cone that can be inscribed within a cube
  874. Minimum number of characters to be replaced to make a given string Palindrome
  875. Check if the array has an element which is equal to product of remaining elements
  876. Total number of subsets in which the product of the elements is even
  877. Minimum cost to cover the given positions in a N*M grid
  878. Minimum steps to convert one binary string to other only using negation
  879. Largest perfect cube number in an Array
  880. Minimum element of each row and each column in a matrix
  881. Product of middle row and column in an odd square matrix
  882. Program to convert the diagonal elements of the matrix to 0
  883. Sorting rows of matrix in descending order followed by columns in ascending order
  884. Count number of triplets (a, b, c) such that a^2 + b^2 = c^2 and 1 <= a <= b <= c <= n
  885. Minimum sum of the elements of an array after subtracting smaller elements from larger
  886. Count number of indices such that s[i] = s[i+1] : Range queries
  887. Number of moves required to guess a permutation.
  888. 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
  889. Find Bit whose minimum sequence flips makes all bits same
  890. Program to find first N Iccanobif Numbers
  891. Frequency of each element of an array of small ranged values
  892. Print numbers with digits 0 and 1 only such that their sum is N
  893. Size of the smallest subset with maximum Bitwise OR
  894. Find number of substrings of length k whose sum of ASCII value of characters is divisible by k
  895. Time taken by two persons to meet on a circular track
  896. Replace every element of the array by its next element
  897. Replace the middle element of matrix with sum of surrounding elements
  898. Expressing a fraction as a natural number under modulo 'm'
  899. Number of balanced bracket expressions that can be formed from a string
  900. Check If every group of a's is followed by a group of b's of same length
  901. Rearrange all elements of array which are multiples of x in decreasing order
  902. Sum of first N natural numbers which are divisible by X or Y
  903. Larger of a^b or b^a (a raised to power b or b raised to power a)
  904. Find the element whose multiplication with -1 makes array sum 0
  905. Reverse middle words of a string
  906. Puzzle | 1000 light bulbs switched on/off by 1000 persons passing by
  907. Reduce the array to a single element with the given operation
  908. Check if the given decimal number has 0 and 1 digits only
  909. Largest Divisor of a Number not divisible by a perfect square
  910. Count all sub-sequences having product <= K - Recursive approach
  911. Check if the sum of perfect squares in an array is divisible by x
  912. Permutations of string such that no two vowels are adjacent
  913. Concatenate suffixes of a String
  914. Minimum removals in a number to be divisible by 10 power raised to K
  915. Split a number into 3 parts such that none of the parts is divisible by 3
  916. Minimum Distance Between Words of a String
  917. Binary Search a String
  918. Count numbers upto N which are both perfect square and perfect cube
  919. Lower Insertion Point
  920. Minimum value that divides one number and divisible by other
  921. Ways to fill N positions using M colors such that there are exactly K pairs of adjacent different colors
  922. Find minimum x such that (x % k) * (x / k) == n | Set-2
  923. Minimum number of operations required to sum to binary string S
  924. Sub-strings that start and end with one character and have at least one other
  925. Maximum number of removals of given subsequence from a string
  926. Biggest Reuleaux Triangle within A Square
  927. Count pairs in an array that hold i+j= arr[i]+arr[j]
  928. Pairs from an array that satisfy the given condition
  929. Largest hexagon that can be inscribed within an equilateral triangle
  930. Recursive program to insert a star between pair of identical characters
  931. Remove consecutive alphabets which are in same case
  932. Check if N is a Factorial Prime
  933. Area of a n-sided regular polygon with given Radius
  934. Recursive Program for Binary to Decimal
  935. Generate number with given operation and check if it is palindrome
  936. Choose n elements such that their mean is maximum
  937. Minimum absolute difference between N and a power of 2
  938. Maximum value of arr[i] % arr[j] for a given array
  939. Count rows in a matrix that consist of same element
  940. Check if it is possible to draw a straight line with the given direction cosines
  941. First and Last Three Bits
  942. Maximum length subarray with LCM equal to product
  943. Find probability of selecting element from kth column after N iterations
  944. Find nth term of the series 5 2 13 41
  945. Print n 0s and m 1s such that no two 0s and no three 1s are together
  946. Biggest Reuleaux Triangle within a Square which is inscribed within a Circle
  947. Print all safe primes below N
  948. Check if it is possible to get back to 12'0 clock only by adding or subtracting given seconds
  949. Rectangle with minimum possible difference between the length and the width
  950. Count of values of x <= n for which (n XOR x) = (n - x)
  951. Find the resulting Colour Combination
  952. Check if a binary string has two consecutive occurrences of one everywhere
  953. Generate a random permutation of 1 to N
  954. Check if possible to shuffle a matrix with adjacent movements
  955. Count number of trailing zeros in (1^1)*(2^2)*(3^3)*(4^4)*..
  956. Check if a + b = c is valid after removing all zeroes from a, b and c
  957. Decrypt a string encrypted by repeating i-th character i times
  958. Arrange first N natural numbers such that absolute difference between all adjacent elements > 1
  959. Increasing sequence with given GCD
  960. Program to find LCM of two Fibonnaci Numbers
  961. Maximum subarray sum in array formed by repeating the given array k times
  962. Number of Simple Graph with N Vertices and M Edges
  963. Check if a binary string contains consecutive same or not
  964. Count Odd and Even numbers in a range from L to R
  965. Generate minimum sum sequence of integers with even elements greater
  966. Split the array into equal sum parts according to given conditions
  967. Modify the string by swapping continuous vowels or consonants
  968. Program to Assign grades to a student using Nested If Else
  969. Sub-string that contains all lowercase alphabets after performing the given operation
  970. Minimum spanning tree cost of given Graphs
  971. Total position where king can reach on a chessboard in exactly M moves
  972. Minimum number of operations to move all uppercase characters before all lower case characters
  973. Choose points from two ranges such that no point lies in both the ranges
  974. Count the number of rhombi possible inside a rectangle of given size
  975. Minimum number of given operations required to convert a string to another string
  976. Program for power of a complex number in O(log n)
  977. Generate a string consisting of characters 'a' and 'b' that satisfy the given conditions
  978. Minimize the sum of squares of sum of N/2 paired formed by N numbers
  979. Count of pairs (x, y) in an array such that x < y
  980. Find a permutation of 2N numbers such that the result of given expression is exactly 2K
  981. Maximum length subarray with difference between adjacent elements as either 0 or 1
  982. Longest subsequence such that adjacent elements have at least one common digit
  983. Numbers in a Range with given Digital Root
  984. Count Hexadecimal Number
  985. Minimize sum of adjacent difference with removal of one element from array
  986. Group consecutive characters of same type in a string
  987. Deletions of "01" or "10" in binary string to make it free from "01" or "10"
  988. Minimum length substring with exactly K distinct characters
  989. Find the first maximum length even word from a string
  990. Sum of (maximum element - minimum element) for all the subsets of an array.
  991. Number of pairs from the first N natural numbers whose sum is divisible by K
  992. Number of ways to make binary string of length N such that 0s always occur together in groups of size K
  993. Count sub-arrays whose product is divisible by k
  994. Count of buttons pressed in a keypad mobile
  995. Find a distinct pair (x, y) in given range such that x divides y
  996. Find the number of binary strings of length N with at least 3 consecutive 1s
  997. Find the number of integers x in range (1,N) for which x and x+1 have same number of divisors
  998. Program to print an array in Pendulum Arrangement with constant space
  999. Program to find the rate percentage from compound interest of consecutive years
  1000. Count the number of primes in the prefix sum array of the given array
  1001. Maximum sum such that no two elements are adjacent | Set 2
  1002. Minimum number of sub-strings of a string such that all are power of 5
  1003. Bitwise AND of sub-array closest to K
  1004. Number of edges in mirror image of Complete binary tree
  1005. Sum of GCDs of each row of the given matrix
  1006. Minimum number of operations on a binary string such that it gives 10^A as remainder when divided by 10^B
  1007. Queries for bitwise OR in the index range [L, R] of the given array
  1008. Find the time which is palindromic and comes after the given time
  1009. Check if a string contains two non overlapping sub-strings "geek" and "keeg"
  1010. Print an N x M matrix such that each row and column has all the vowels in it
  1011. Check whether an array can be made strictly increasing by modifying atmost one element
  1012. Count of all possible values of X such that A % X = B
  1013. Count the triplets such that A[i] < B[j] < C[k]
  1014. Distance of chord from center when distance between center and another equal length chord is given
  1015. 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
  1016. Find the number of Chicks in a Zoo at Nth day