mohit kumar 29
mohit kumar 29
  1. Find all the numbers in a string using regular expression in Python
  2. Check if the sum of perfect squares in an array is divisible by x
  3. Find the nth term of the series 0, 8, 64, 216, 512, . . .
  4. Sum of elements whose square root is present in the array
  5. Leftmost and rightmost indices of the maximum and the minimum element of an array
  6. Sum of elements from an array having even parity
  7. Count numbers have all 1s together in binary representation
  8. The most occurring number in a string using Regex in python
  9. All pairs whose xor gives unique prime
  10. Count of numbers which can be made power of 2 by given operation
  11. Find elements of array using XOR of consecutive elements
  12. Find the Nth term of the series 9, 45, 243,1377
  13. Pairs from an array that satisfy the given condition
  14. Find the sum of first N terms of the series 2*3*5, 3*5*7, 4*7*9, ...
  15. Jump in rank of a student after updating marks
  16. Program to find the nth term of the series -2, 4, -6, 8....
  17. Program to find the Nth term of the series 0, 3/1, 8/3, 15/5........
  18. Find the sum of non-prime elements in the given array
  19. Print all safe primes below N
  20. Count pairs in an array such that at least one element is prime
  21. Check whether the sum of absolute difference of adjacent digits is Prime or not
  22. Print prime numbers with prime sum of digits in an array
  23. Print all multiplicative primes <= N
  24. Find the node whose xor with x gives minimum value
  25. Find the node whose xor with x gives maximum value
  26. Find the node whose sum with X has maximum set bits
  27. Find the node whose absolute difference with X gives maximum value
  28. Find the node whose sum with X has minimum set bits
  29. Find the node whose absolute difference with X gives minimum value
  30. Count the nodes whose weight is a perfect square
  31. Count the nodes in the given tree whose weight is prime
  32. Count the nodes in the given tree whose weight is even
  33. Find the root of the sub-tree whose weighted sum is minimum
  34. Find the root of the sub-tree whose weighted sum XOR with X is minimum
  35. Find the root of the sub-tree whose weighted sum XOR with X is maximum
  36. Count the nodes in the given tree whose weight is a power of two
  37. Count the nodes in the given tree whose weight is even parity
  38. Count the nodes in the given tree whose sum of digits of weight is odd
  39. Count the nodes of the given tree whose weighted string is a palindrome
  40. Count the nodes of the given tree whose weight has X as a factor
  41. Count the nodes of a tree whose weighted string does not contain any duplicate characters
  42. Count the nodes of a tree whose weighted string is an anagram of the given string
  43. Count the nodes of the tree which make a pangram when concatenated with the sub-tree nodes
  44. Python | Count the array elements with factors less than or equal to the factors of given x
You may use GeeksforGeeks CONTRIBUTE portal to help other geeks. For more info, please refer this.

  1. How to swap two numbers without using a temporary variable?
  2. Efficient way to multiply with 7
  3. Find the Number Occurring Odd Number of Times
  4. Find the Missing Number
  5. Two elements whose sum is closest to zero
  6. Find whether a given number is a power of 4 or not
  7. A Product Array Puzzle
  8. Check if array elements are consecutive | Added Method 3
  9. Smallest of three integers without comparison operators
  10. Count total set bits in all numbers from 1 to n
  11. Partition problem | DP-18
  12. Find the element that appears once
  13. Generate n-bit Gray Codes
  14. Minimum insertions to form a palindrome | DP-28
  15. Print all possible strings of length k that can be formed from a set of n characters
  16. Print all possible paths from top left to bottom right of a mXn matrix
  17. Count all possible paths from top left to bottom right of a mXn matrix
  18. Find the first repeating element in an array of integers
  19. K'th Smallest/Largest Element in Unsorted Array | Set 2 (Expected Linear Time)
  20. Given a matrix of 'O' and 'X', find the largest subsquare surrounded by 'X'
  21. Find the element that appears once in an array where every other element appears twice
  22. Find the nearest smaller numbers on left side in an array
  23. Sum of minimum and maximum elements of all subarrays of size k.
  24. Count numbers from 1 to n that have 4 as a digit
  25. Count distinct elements in every window of size k
  26. Trapping Rain Water
  27. Minimum Initial Points to Reach Destination
  28. Count of n digit numbers whose sum of digits equals to given sum
  29. Given an array of pairs, find all symmetric pairs in it
  30. Print a pattern without using any loop
  31. Find XOR of two number without using XOR operator
  32. Print individual digits as words without using if or switch
  33. Fibonacci Coding
  34. Count Fibonacci numbers in given range in O(Log n) time and O(1) space
  35. Longest Zig-Zag Subsequence
  36. Common elements in all rows of a given matrix
  37. Repeated subsequence of length 2 or more
  38. Count pairs formed by distinct element sub-arrays
  39. Find smallest range containing elements from k lists
  40. Find the minimum difference between Shifted tables of two numbers
  41. Longest Common Increasing Subsequence (LCS + LIS)
  42. Remove duplicates from an array of small primes
  43. Rearrange positive and negative numbers with constant extra space
  44. Printing Maximum Sum Increasing Subsequence
  45. Print all n-digit strictly increasing numbers
  46. Calculate sum of all numbers present in a string
  47. Find Shortest distance from a guard in a Bank
  48. Count digit groupings of a number with given constraints
  49. Count Distinct Subsequences
  50. Frequency Measuring Techniques for Competitive Programming
  51. Length of Longest sub-string that can be removed
  52. Count all sorted rows in a matrix
  53. Count all pairs with given XOR
  54. Print matrix in diagonal pattern
  55. Minimum sum of two numbers formed from digits of an array
  56. Convert to a string that is repetition of a substring of k length
  57. Maximum 0's between two immediate 1's in binary representation
  58. Minimum sum subsequence such that at least one of every four consecutive elements is picked
  59. Find all distinct subset (or subsequence) sums of an array
  60. Sort even-placed elements in increasing and odd-placed in decreasing order
  61. Find sum of divisors of all the divisors of a natural number
  62. Print all possible consecutive numbers with sum N
  63. Find pair with greatest product in array
  64. Find pairs in array whose sums already exist in array
  65. Find elements which are present in first array and not in second
  66. k-th prime factor of a given number
  67. Queries on substring palindrome formation
  68. Count of index pairs with equal elements in an array
  69. Maximum number of groups of size 3 containing two type of items
  70. Minimum time required to produce m items
  71. Range Queries for Frequencies of array elements
  72. Check if reversing a sub array make the array sorted
  73. Allocate minimum number of pages
  74. Efficiently check if a string has all unique characters without using any additional data structure
  75. Largest subsequence having GCD greater than 1
  76. Nearest element with at-least one common prime factor
  77. Prime Factorization using Sieve O(log n) for multiple queries
  78. Maximum and Minimum in a square matrix.
  79. Count all pairs of an array which differ in K bits
  80. Ways to represent a number as a sum of 1's and 2's
  81. Find all pairs (a,b) and (c,d) in array which satisfy ab = cd
  82. Search, insert and delete in a sorted array
  83. Check if frequency of each digit is less than the digit
  84. Count pairs with sum as a prime number and less than n
  85. Noble integers in an array (count of greater elements is equal to value)
  86. Find if n can be written as product of k numbers
  87. Count the number of subarrays having a given XOR
  88. Minimum cost for acquiring all coins with k extra coins allowed with every coin
  89. Find the largest three elements in an array
  90. Check whether an array can be fit into another array rearranging the elements in the array
  91. Minimum number of Appends needed to make a string palindrome
  92. Find a peak element in a 2D array
  93. Count the number of ways to divide an array into three contiguous parts having equal sum
  94. k-th distinct (or non-repeating) element in an array.
  95. Find index of an extra element present in one sorted array
  96. Print all distinct characters of a string in order (3 Methods)
  97. k-th smallest absolute difference of two elements in an array
  98. Print a given matrix in reverse spiral form
  99. Print modified array after multiple array range increment operations
  100. Random list of M non-negative integers whose sum is N
  101. Program to print all substrings of a given string
  102. Count of only repeated element in a sorted array of consecutive elements
  103. Count subarrays having total distinct elements same as original array
  104. Find all pairs (a, b) in an array such that a % b = k
  105. Extract maximum numeric value from a given string | Set 1 (General approach)
  106. Elements of an array that are not divisible by any element of another array
  107. Divide the two given numbers by their common divisors
  108. Check whether the sum of absolute difference of adjacent digits is Prime or not
  109. Minimum insertions to form a palindrome with permutations allowed
  110. Nth Even length Palindrome
  111. Program to calculate the number of odd days in given number of years
  112. Find the character in first string that is present at minimum index in second string
  113. Find the overlapping sum of two arrays
  114. Program to print solid and hollow square patterns
  115. Count of integers of length N and value less than K such that they contain digits only from the given set
  116. Convert all substrings of length 'k' from base 'b' to decimal
  117. Check if the given string of words can be formed from words present in the dictionary
  118. Check if binary representation of a given number and its complement are anagram
  119. Next greater element in same order as input
  120. Longest common substring in binary representation of two numbers
  121. Remove minimum number of elements such that no common element exist in both array
  122. Evaluate a boolean expression represented as string
  123. Count subarrays with equal number of occurrences of two given elements
  124. Count of sub-sequences which satisfy the given condition
  125. Count number of paths whose weight is exactly X and has at-least one edge of weight M
  126. Count number of distinct pairs whose sum exists in the given array
  127. Maximum sum bitonic subarray
  128. Check if a number is power of 8 or not
  129. C++ Program for Longest Increasing Subsequence
  130. Check if two unsorted arrays (with duplicates allowed) have same elements
  131. Positive elements at even and negative at odd positions (Relative order not maintained)
  132. Find substrings that contain all vowels
  133. Program to find if a character is vowel or Consonant
  134. Array range queries over range queries
  135. Smallest number k such that the product of digits of k is equal to n
  136. Generate two output strings depending upon occurrence of character in input string.
  137. Given a n-ary tree, count number of nodes which have more number of children than parents
  138. Program for diamond pattern with different layers
  139. Find the Majority Element | Set 3 (Bit Magic)
  140. Number of triangles that can be formed
  141. Number of subarrays having absolute sum greater than K | Set-2
  142. Mean of range in array
  143. Distance of closest zero to every element
  144. Combinations from n arrays picking one element from each array
  145. Tile Stacking Problem
  146. Cumulative frequency of count of each element in an unsorted array
  147. Print digit's position to be removed to make a number divisible by 6
  148. Maximum number of characters between any two same character in a string
  149. Longest subsequence such that difference between adjacents is one | Set 2
  150. Queries for the product of first N factorials
  151. Print symmetric double triangle pattern
  152. Elements to be added so that all elements of a range are present in array
  153. Only integer with positive value in positive negative value in array
  154. Divisors of n-square that are not divisors of n
  155. Largest number with prime digits
  156. Maximum Unique Element in every subarray of size K
  157. Check whether a number can be represented by sum of two squares
  158. Find if there is a rectangle in binary matrix with corners as 1
  159. Pair with given sum and maximum shortest distance from end
  160. Generate original array from an array that store the counts of greater elements on right
  161. Find minimum shift for longest common prefix
  162. Minimum jumps to reach last building in a matrix
  163. Program to find the minimum (or maximum) element of an array
  164. Find largest element from array without using conditional operator
  165. Program to print number with star pattern
  166. Program to find third side of triangle using law of cosines
  167. Check whether second string can be formed from characters of first string
  168. Partition into two subarrays of lengths k and (N - k) such that the difference of sums is maximum
  169. Largest subset with sum of every pair as prime
  170. Minimum number of points to be removed to get remaining points on one side of axis
  171. Count number of increasing subsequences of size k
  172. Smallest subarray with all occurrences of a most frequent element
  173. Count subarrays with equal number of 1's and 0's
  174. Maximum possible elements which are divisible by 2
  175. Check if the given string is the same as its reflection in a mirror
  176. Number of terms in Geometric Series with given conditions
  177. Program to print V and inverted-V pattern
  178. Find the position of the last removed element from the array
  179. Count maximum-length palindromes in a String
  180. Construct sum-array with sum of elements in given range
  181. Longest Uncommon Subsequence
  182. Space efficient iterative method to Fibonacci number
  183. Program to copy the contents of one array into another in the reverse order
  184. Count of numbers appearing in the given ranges at-least K times
  185. Find minimum length sub-array which has given sub-sequence in it
  186. Maximum sum of increasing order elements from n arrays
  187. Find i'th Index character in a binary string obtained after n iterations
  188. Most frequent element in an array
  189. Least frequent element in an array
  190. Find the only repetitive element between 1 to n-1
  191. Largest even digit number not greater than N
  192. Find largest d in array such that a + b + c = d
  193. Sum of special triplets having elements from 3 arrays
  194. Array range queries for elements with frequency same as value
  195. Count substrings with each character occurring at most k times
  196. Maximum possible difference of two subsets of an array
  197. XOR of a subarray (range of elements)
  198. Count pairs in an array which have at least one digit common
  199. Find the Largest Cube formed by Deleting minimum Digits from a number
  200. Longest substring having K distinct vowels
  201. Print array elements that are divisible by at-least one other
  202. Minimum number using set bits of a given number
  203. Program to print the hollow numerical parallelogram
  204. Printing longest Increasing consecutive subsequence
  205. Count binary strings with twice zeros in first half
  206. Max sum of M non-overlapping subarrays of size K
  207. Find Sum of all unique sub-array sum for a given array.
  208. Prefixes with more a than b
  209. Find the value of N XOR'ed to itself K times
  210. Find the only element that appears b times
  211. Print all triplets with given sum
  212. Compute power of power k times % m
  213. Count elements present in first array but not in second
  214. Minimum steps to reach end from start by performing multiplication and mod operations with array elements
  215. Maximum number by concatenating every element in a rotation of an array
  216. Minimum operations required to make all the elements distinct in an array
  217. Previous greater element
  218. Count of elements of an array present in every row of NxM matrix
  219. Number of Counterclockwise shifts to make a string palindrome
  220. First non-repeating character using one traversal of string | Set 2
  221. Find the Nth Mosaic number
  222. Longest Common Subsequence | DP using Memoization
  223. Egg Dropping Puzzle with 2 Eggs and K Floors
  224. Elements of first array that have more frequencies
  225. Sum of similarities of string with all of its suffixes
  226. Smallest sum contiguous subarray | Set-2
  227. Maximum bishops that can be placed on N*N chessboard
  228. All elements in an array are Same or not?
  229. Program to print Sine-Wave Pattern
  230. Sum of all elements repeating 'k' times in an array
  231. Check if a number is in given base or not
  232. Find next palindrome prime
  233. Counting frequencies of array elements
  234. Maximum profit after buying and selling the stocks
  235. Find N in the given matrix that follows a pattern
  236. Find the Missing Number in a sorted array
  237. Elements that occurred only once in the array
  238. Check if the first and last digit of the smallest number forms a prime
  239. Length of longest common subsequence containing vowels
  240. Minimum number of items to be delivered
  241. Longest subarray having maximum sum
  242. Find the largest after deleting the given elements
  243. Solve the Logical Expression given by string
  244. Find the Initial Array from given array after range sum queries
  245. Longest dividing subsequence
  246. Maximize the product of four factors of a Number
  247. Find minimum number of Log value needed to calculate Log upto N
  248. Longest Subarray with Sum greater than Equal to Zero
  249. Longest subarray having difference in the count of 1's and 0's equal to k
  250. Minimum number greater than the maximum of array which cannot be formed using the numbers in the array
  251. Minimum changes required to make two arrays identical
  252. Count common subsequence in two strings
  253. Minimum and Maximum prime numbers in an array
  254. Program to print Kite Pattern
  255. Minimum odd cost path in a matrix
  256. Divide an array into K subarray with the given condition
  257. Maximize the value of A by replacing some of its digits with digits of B
  258. Find triplets in an array whose AND is maximum
  259. Find column with maximum sum in a Matrix
  260. Program to print the Zigzag pattern
  261. Find the k-th smallest divisor of a natural number N
  262. Pair with maximum difference in a Matrix
  263. Check if a pair with given absolute difference exists in a Matrix
  264. Find the sum of all highest occurring elements in an Array
  265. Sum of all minimum occurring elements in an Array
  266. Program to print Hut Star pattern
  267. Product of non-repeating (distinct) elements in an Array
  268. Sum of all prime numbers in an Array
  269. Product of all prime numbers in an Array
  270. Program to Print Mirrored Hollow Parallelogram
  271. Maximum number of Unique integers in Sub-Array of given size
  272. Find the smallest after deleting given elements
  273. Remove duplicates from unsorted array using Map data structure
  274. Find the k largest numbers after deleting the given elements
  275. Find the k smallest numbers after deleting given elements
  276. Number of leading zeros in binary representation of a given number
  277. Check if a number is a Mystery Number
  278. Find the Product of first N Prime Numbers
  279. Find subsequences with maximum Bitwise AND and Bitwise OR
  280. Count and Sum of composite elements in an array
  281. Count elements such that there are exactly X elements with values greater than or equal to X
  282. Find maximum distance between any city and station
  283. Program to find Prime Numbers Between given Interval
  284. Product of all the Composite Numbers in an array
  285. Convert given array to Arithmetic Progression by adding an element
  286. Count pairs in an array such that frequency of one is at least value of other
  287. Replace each element by the difference of the total size of the array and frequency of that element
  288. Sum of array Elements without using loops and recursion
  289. Magical Pattern
  290. Count pairs in an array such that both elements has equal set bits
  291. Largest number not greater than N all the digits of which are odd
  292. Find a number that divides maximum array elements
  293. Check if the array has an element which is equal to sum of all the remaining elements
  294. Check whether the frequencies of all the characters in a string are prime or not
  295. Count pairs from two arrays whose modulo operation yields K
  296. Find all numbers that divide maximum array elements
  297. Sort an array according to the increasing count of distinct Prime Factors
  298. Count Triplets such that one of the numbers can be written as sum of the other two
  299. Number of leaf nodes in the subtree of every node of an n-ary tree
  300. Number of ways to reach the end of matrix with non-zero AND value
  301. Minimize the number of steps required to reach the end of the array
  302. Maximum sum subarray such that start and end values are same
  303. Find maximum element of each column in a matrix
  304. Maximum length substring with highest frequency in a string
  305. Sum of elements in an array having prime frequency
  306. Find smallest and largest element from square matrix diagonals
  307. Find the sum of Eigen Values of the given N*N matrix
  308. Find the largest interval that contains exactly one of the given N integers.
  309. Find alphabet in a Matrix which has maximum number of stars around it
  310. Find a sub matrix with maximum XOR
  311. Minimum Distance Between Words of a String
  312. Count the number of special permutations
  313. Integers from the range that are composed of a single distinct digit
  314. Count numbers in a range having GCD of powers of prime factors equal to 1
  315. LCM of N numbers modulo M
  316. Minimum in an array which is first decreasing then increasing
  317. Minimum steps to reach any of the boundary edges of a matrix | Set 1
  318. Form N-copy string with add, remove and append operations
  319. Find minimum x such that (x % k) * (x / k) == n
  320. Sum of kth powers of first n natural numbers
  321. Find elements of array using XOR of consecutive elements
  322. Find the maximum possible value of the minimum value of modified array
  323. Area of Reuleaux Triangle
  324. Biggest Reuleaux Triangle within A Square
  325. Count pairs in an array that hold i+j= arr[i]+arr[j]
  326. Reach the numbers by making jumps of two given lengths
  327. Largest hexagon that can be inscribed within an equilateral triangle
  328. A Sum Array Puzzle
  329. Diagonal of a Regular Heptagon
  330. Diagonal of a Regular Decagon
  331. Length of Diagonal of a n-sided regular polygon
  332. Generate all rotations of a number
  333. Count number of pairs (i, j) such that arr[i] * arr[j] > arr[i] + arr[j]
  334. How to delete an element from the Set by passing its value in C++
  335. Minimum distance to the end of a grid from source
  336. Generate permutation of 1 to N such that absolute difference of consecutive numbers give K distinct integers
  337. Count rows in a matrix that consist of same element
  338. Number of subarrays have bitwise OR >= K
  339. Smallest multiple of 3 which consists of three given non-zero digits
  340. Minimum number of sets with numbers less than Y
  341. Minimum number N such that total set bits of all numbers from 1 to N is at-least X
  342. Count pairs of parentheses sequences such that parentheses are balanced
  343. Minimum steps required to convert X to Y where a binary matrix represents the possible conversions
  344. Distribute N candies among K people
  345. Program to find nth term of the series 1 4 15 24 45 60 92
  346. Possible cuts of a number such that maximum parts are divisible by 3
  347. First and Last Three Bits
  348. K length words that can be formed from given characters without repetition
  349. Program to print Step Pattern
  350. Length of the longest substring with consecutive characters
  351. Largest sub-set possible for an array satisfying the given condition
  352. Ways to paint N paintings such that adjacent paintings don't have same colors
  353. Maximum length subarray with LCM equal to product
  354. Find probability of selecting element from kth column after N iterations
  355. Find the sum of the all amicable numbers up to N
  356. Sum of P terms of an AP if Mth and Nth terms are given
  357. Ternary Search
  358. Biggest Reuleaux Triangle within a Square which is inscribed within a Circle
  359. Biggest Reuleaux Triangle within a Square which is inscribed within a Right angle Triangle
  360. Largest right circular cylinder that can be inscribed within a cone which is in turn inscribed within a cube
  361. Print all Proth primes up to N
  362. Find Pth term of a GP if Mth and Nth terms are given
  363. Count distinct elements in an array
  364. Count of strings that become equal to one of the two strings after one removal
  365. Minimum cost of choosing 3 increasing elements in an array of size N
  366. Rearrange Odd and Even values in Alternate Fashion in Ascending Order
  367. Count number of sub-sequences with GCD 1
  368. Largest number less than or equal to N/2 which is coprime to N
  369. Reverse Middle X Characters
  370. Find the area of largest circle inscribed in ellipse
  371. Print multiples of Unit Digit of Given Number
  372. Rectangle with minimum possible difference between the length and the width
  373. Count strings that end with the given pattern
  374. Biggest Reuleaux Triangle inscribed within a Square inscribed in an equilateral triangle
  375. Biggest Reuleaux Triangle inscirbed within a square inscribed in a semicircle
  376. Count of values of x <= n for which (n XOR x) = (n - x)
  377. Generate lexicographically smallest string of 0, 1 and 2 with adjacent swaps allowed
  378. Find the final X and Y when they are Altering under given condition
  379. Check if it is possible to reach a number by making jumps of two given length
  380. Count the number of survivors
  381. Remove characters from a numeric string such that string becomes divisible by 8
  382. Remove any corner X rows and columns from a matrix
  383. Count of pairs of (i, j) such that ((n % i) % j) % n is maximized
  384. Largest sphere that can be inscribed in a right circular cylinder inscribed in a frustum
  385. Minimum positive integer divisible by C and is not in range [A, B]
  386. Count all Prime Length Palindromic Substrings
  387. Find minimum difference between any two elements | Set 2
  388. Find Intersection of all Intervals
  389. Maximum length subsequence such that adjacent elements in the subsequence have a common factor
  390. Number of strings that satisfy the given condition
  391. Check if a string can be converted to another string by replacing vowels and consonants
  392. Sum of XOR of all subarrays
  393. Sum of bitwise AND of all subarrays
  394. Minimum index i such that all the elements from index i to given index are equal
  395. Find the longest Fibonacci-like subarray of the given array
  396. Split an array into groups of 3 such that X3 is divisible by X2 and X2 is divisible by X1
  397. Queries for number of distinct integers in Suffix
  398. Maximum positive integer divisible by C and is in the range [A, B]
  399. Ways to form an array having integers in given range such that total sum is divisible by 2
  400. Select numbers in such way to maximize the amount of money
  401. Check whether the number can be made perfect square after adding 1
  402. Number of Hamiltonian cycle
  403. Split the array into odd number of segments of odd lengths
  404. Check if an array of 1s and 2s can be divided into 2 parts with equal sum
  405. Minimum number of stacks possible using boxes of given capacities
  406. Count array elements that divide the sum of all other elements
  407. Number of trailing zeroes in base 16 representation of N!
  408. Count paths with distance equal to Manhattan distance
  409. Find the number of solutions to the given equation
  410. Find whether only two parallel lines contain all coordinates points or not
  411. XOR of a submatrix queries
  412. Find the number of distinct pairs of vertices which have a distance of exactly k in a tree
  413. Find the minimum number of preprocess moves required to make two strings equal
  414. Find the Nth term of the series where each term f[i] = f[i - 1] - f[i - 2]
  415. Minimum number of given powers of 2 required to represent a number
  416. Sum of minimum element of all sub-sequences of a sorted array
  417. k-th missing element in an unsorted array
  418. Maximum occurrence of prefix in the Array
  419. Longest subsequence such that adjacent elements have at least one common digit
  420. Count all elements in the array which appears at least K times after their first occurrence
  421. Two equal sum segment range queries
  422. Numbers in a Range with given Digital Root
  423. Sum of numbers from 1 to N which are in Lucas Sequence
  424. Check for an array element that is co-prime with all others
  425. Find GCD of factorial of elements of given array
  426. Minimum steps to make all the elements of the array divisible by 4
  427. Find sum of a[i]%a[j] for all valid pairs
  428. Sum of elements in an array whose difference with the mean of another array is less than k
  429. Count of numbers from range [L, R] whose sum of digits is Y
  430. Find the sum of all Truncatable primes below N
  431. Search an element in given N ranges
  432. Check if the given array can be reduced to zeros with the given operation performed given number of times
  433. Find the numbers of strings that can be formed after processing Q queries
  434. Count number of trailing zeros in Binary representation of a number using Bitset
  435. Minimum array elements to be changed to make Recaman's sequence
  436. Maximum array sum that can be obtained after exactly k changes
  437. Replace the odd positioned elements with their cubes and even positioned elements with their squares
  438. Pairs of strings which on concatenating contains each character of "string"
  439. Generate original array from difference between every two consecutive elements
  440. Count number of ways to reach a given score in a Matrix
  441. Count of sub-strings that do not contain all the characters from the set {'a', 'b', 'c'} at the same time
  442. Find the area of the shaded region formed by the intersection of four semicircles in a square
  443. Maximum points covered after removing an Interval
  444. Minimum steps to color the tree with given colors
  445. Check whether factorial of N is divisible by sum of first N natural numbers
  446. Count of distinct sums that can be obtained by adding prime numbers from given arrays
  447. Maximum element in a sorted and rotated array
  448. Find the minimum number of steps to reach M from N
  449. Count the number of operations required to reduce the given number
  450. Sum of the series Kn + ( K(n-1) * (K-1)1 ) + ( K(n-2) * (K-1)2 ) + ....... (K-1)n
  451. Find the value of N when F(N) = f(a)+f(b) where a+b is the minimum possible and a*b = N
  452. Area of the biggest ellipse inscribed within a rectangle
  453. Count distinct points visited on the number line
  454. Count consecutive pairs of same elements
  455. Length of the longest increasing subsequence such that no two adjacent elements are coprime
  456. Find n positive integers that satisfy the given equations
  457. Find the Kth node in the DFS traversal of a given subtree in a Tree
  458. Maximize the happiness of the groups on the Trip
  459. Find (1^n + 2^n + 3^n + 4^n) mod 5 | Set 2
  460. Find the longest sub-string which is prefix, suffix and also present inside the string
  461. Find missing element in a sorted array of consecutive numbers
  462. Minimum number of changes such that elements are first Negative and then Positive
  463. Find the number of players who roll the dice when the dice output sequence is given
  464. Predict the winner of the game on the basis of absolute difference of sum by selecting numbers
  465. Program to calculate product of digits of a number
  466. Count the number of currency notes needed
  467. Minimize the sum calculated by repeatedly removing any two elements and inserting their sum to the Array
  468. Queries to answer the number of ones and zero to the left of given index
  469. Program to find the maximum difference between the index of any two different numbers
  470. Minimum possible final health of the last monster in a game
  471. Check if all the 1's in a binary string are equidistant or not
  472. Find the sum of digits of a number at even and odd places
  473. Find the value at kth position in the generated array
  474. 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
  475. Find the lexicographically smallest string which satisfies the given condition
  476. Find the number of sub arrays in the permutation of first N natural numbers such that their median is M
  477. Travelling Salesman Problem implementation using BackTracking
  478. Find HCF of two numbers without using recursion or Euclidean algorithm
  479. Queries to check if substring[L...R] is palindrome or not
  480. Count pairs of non-overlapping palindromic sub-strings of the given string
  481. Number of triangles possible with given lengths of sticks which are powers of 2
  482. Count of elements whose absolute difference with the sum of all the other elements is greater than k
  483. Find minimum positive integer x such that a(x^2) + b(x) + c >= k
  484. Print 2-D co-ordinate points in ascending order followed by their frequencies
  485. Number of subsequences with zero sum
  486. Count of sub-strings that do not consist of the given character
  487. Count the pairs of vowels in the given string
  488. Find the kth element in the series generated by the given N ranges
  489. Check whether the given string is a valid identifier
  490. Count of sub-strings of length n possible from the given string
  491. Maximum absolute difference in an array
  492. Move all zeros to start and ones to end in an Array of random integers
  493. Find out the minimum number of coins required to pay total amount
  494. Maximum elements which can be crossed using given units of a and b
  495. Sum of the series 1, 2, 4, 3, 5, 7, 9, 6, 8, 10, 11, 13.. till N-th term
  496. Reverse alternate k characters in a string
  497. Check if a number from every row can be selected such that xor of the numbers is greater than zero
  498. Area of triangle formed by the axes of co-ordinates and a given straight line
  499. Check if given two straight lines are identical or not
  500. Minimum number of elements to be removed such that the sum of the remaining elements is equal to k
  501. Find maximum product of digits among numbers less than or equal to N
  502. Check if the frequency of any character is more than half the length of the string
  503. Maximum length palindrome that can be created with characters in range L and R
  504. Number of ways to arrange K different objects taking N objects at a time
  505. Game Theory in Balanced Ternary Numeral System | (Moving 3k steps at a time)
  506. Find the position of box which occupies the given ball
  507. Find the Diameter or Longest chord of a Circle
  508. Determine the position of the third person on regular N sided polygon
  509. Length of the chord of the circle whose radius and the angle subtended at the center by the chord is given
  510. Maximum length of subarray such that sum of the subarray is even
  511. Sliding Window Maximum (Maximum of all subarrays of size k) using stack in O(n) time
  512. Longest alternative parity subsequence
  513. Roots of the quadratic equation when a + b + c = 0 without using Shridharacharya formula
  514. Generate an array of size K which satisfies the given conditions
  515. Rearrange the array to maximize the number of primes in prefix sum of the array
  516. Find the occurrence of the given binary pattern in the binary representation of the array elements
  517. Bitwise AND of sub-array closest to K
  518. Optimal Strategy for a Game | Set 2
  519. Sum of GCDs of each row of the given matrix
  520. Queries to find the maximum Xor value between X and the nodes of a given level of a perfect binary tree
  521. Find the index which is the last to be reduced to zero after performing a given operation
  522. Number of common tangents between two circles if their centers and radius is given
  523. Check if a circle lies inside another circle or not
  524. Build original array from the given sub-sequences
  525. Print all leaf nodes of an n-ary tree using DFS
  526. Count the nodes of the tree whose weighted string contains a vowel
  527. Find the permutation p from the array q such that q[i] = p[i+1] - p[i]
  528. Print all neighbour nodes within distance K
  529. Longest substring such that no three consecutive characters are same
  530. Number of ways to arrange a word such that no vowels occur together
  531. Minimum count of elements that sums to a given number
  532. Maximum items that can be filled in K Knapsacks of given Capacity
  533. Sum of all perfect numbers present in an array
  534. Print all the sub diagonal elements of the given square matrix
  535. Print all the super diagonal elements of the given square matrix
  536. Find the number of p-sided squares in a grid with K blacks painted
  537. Construct the Rooted tree by using start and finish time of its DFS traversal
  538. Find the total number of composite factor for a given number
  539. Count of substrings which contains a given character K times
  540. Total number of odd length palindrome sub-sequence around each centre
  541. Print Lower Hessenberg matrix of order N
  542. Print Upper Hessenberg matrix of order N
  543. Count common elements in two arrays containing multiples of N and M
  544. Total number of possible Binary Search Trees using Catalan Number
  545. Minimum operations to make sum of neighbouring elements <= X
  546. Number of triangles formed by joining vertices of n-sided polygon with one side common
  547. Maximum number of region in which N non-parallel lines can divide a plane
  548. Count pairs of strings that satisfy the given conditions
  549. Find the maximum number of elements divisible by 3
  550. Rearrange characters in a string such that no two adjacent are same using hashing
  551. Number of triangles formed by joining vertices of n-sided polygon with two common sides and no common sides
  552. Find Nth smallest number that is divisible by 100 exactly K times
  553. Find maximum value of the last element after reducing the array with given operations
  554. Find optimal weights which can be used to weigh all the weights in the range [1, X]
  555. Case-specific Sorting of Strings
  556. Number of ways of writing N as a sum of 4 squares
  557. Find a sequence of N prime numbers whose sum is a composite number
  558. Number of possible permutations when absolute difference between number of elements to the right and left are given
  559. Find the Nth term divisible by a or b or c
  560. Find K vertices in the graph which are connected to at least one of remaining vertices
  561. Reverse individual words with O(1) extra space
  562. Count of numbers whose 0th and Nth bits are set
  563. Percentage increase in the cylinder if the height is increased by given percentage but radius remains constant
  564. Percentage increase in volume of the sphere if radius is increased by a given percentage
  565. Find a number containing N - 1 set bits at even positions from the right
  566. Sentence Case of a given Camel cased string
  567. Minimum steps required to convert the matrix into lower hessenberg matrix
  568. Find a subarray whose sum is divisible by size of the array
  569. Optimally accommodate 0s and 1s from a Binary String into K buckets
  570. Flip minimum signs of array elements to get minimum sum of positive elements possible
  571. Find the number which when added to the given ratio a : b, the ratio changes to c : d
  572. Longest Consecuetive Subsequence when only one insert operation is allowed
  573. Sum of Semi-Prime Numbers less than or equal to N
  574. Find three element from given three arrays such that their sum is X | Set 2
  575. Number of intersections between two ranges
  576. Maximum element in an array such that its previous and next element product is maximum
  577. Number of ways of distributing N identical objects in R distinct groups
  578. Number of ways of distributing N identical objects in R distinct groups with no groups empty
  579. Total ways of choosing X men and Y women from a total of M men and W women
  580. Sort an array without changing position of negative numbers
  581. Greatest contiguous sub-array of size K
  582. Find Leftmost and Rightmost node of BST from its given preorder traversal
  583. Minimum number of steps to convert a given matrix into Diagonally Dominant Matrix
  584. Longest sub-array with equal number of alphabets and numeric characters
  585. Distinct adjacent elements in a binary array
  586. Find a partition point in array to maximize its xor sum
  587. 21 Matchsticks Problem
  588. Length of longest subarray in which elements greater than K are more than elements not greater than K
  589. Count of strings in the first array which are smaller than every string in the second array
  590. Number of N length sequences whose product is M
  591. Remove an element to maximize the GCD of the given array
  592. Number of hours after which the second person moves ahead of the first person if they travel at a given speed
  593. Number formed by the rightmost set bit in N
  594. Count of pairs between two arrays such that the sums are distinct
  595. Sequence with sum K and minimum sum of absolute differences between consecutive elements
  596. Find minimum possible values of A, B and C when two of the (A + B), (A + C) and (B + C) are given
  597. Find the color of given node in an infinite binary tree
  598. Arrange N elements in circular fashion such that all elements are strictly less than sum of adjacent elements
  599. Check if all the elements can be made equal on dividing with X and Y
  600. Count of N digit numbers possible which satisfy the given conditions
  601. Distinct strings such that they contains given strings as sub-sequences
  602. Count pairs with given sum | Set 2
  603. Probability of distributing M items among X bags such that first bag contains N items
  604. Minimum operations required to convert X to Y by multiplying X with the given co-primes
  605. Partition the array in K segments such that bitwise AND of individual segment sum is maximized
  606. Count ways to divide circle using N non-intersecting chord | Set-2
  607. Find k ordered pairs in array with minimum difference d
  608. Largest and smallest digit of a number
  609. Maximum length sub-array which satisfies the given conditions
  610. Minimum number of Bottles visible when a bottle can be enclosed inside another Bottle
  611. Sum of the distances from every node to all other nodes is maximum
  612. Perimeter of an Ellipse
  613. Find the number of occurrences of a character upto preceding position
  614. Longest sub string of 0's in a binary string which is repeated K times
  615. XOR in a range of a binary array
  616. Swap all occurrences of two characters to get lexicographically smallest string
  617. Count of elements that can be deleted without disturbing the mean of the initial array
  618. Maximum sum of the array after dividing it into three segments
  619. Find prime numbers in the first half and second half of an array
  620. Smallest element greater than X not present in the array
  621. Check if the given string is vowel prime
  622. Euler zigzag numbers ( Alternating Permutation )
  623. Program for sum of cosh(x) series upto Nth term
  624. Alcuin's Sequence
  625. Wedderburn–Etherington number
  626. Find the kth smallest number with sum of digits as m
  627. Rearrange the characters of the string such that no two adjacent characters are consecutive English alphabets
  628. Count number of ways to reach destination in a maze
  629. Ramanujan Prime
  630. Quadruplet pair with XOR zero in the given Array
  631. Program to find first N Fermat Numbers
  632. Recursive program to find all Indices of a Number
  633. Right most non-zero digit in multiplication of array elements
  634. Maximum number of given operations to remove the entire string
  635. Count of all possible pairs of disjoint subsets of integers from 1 to N
  636. Print all the peaks and troughs in an Array of Integers
  637. Queries to print the character that occurs the maximum number of times in a given range
  638. Subsequence X of length K such that gcd(X[0], X[1]) + (X[2], X[3]) + ... is maximized
  639. Maximum Bitwise AND value of subsequence of length K
  640. Sum of N terms in the expansion of Arcsin(x)
  641. Product of Primes of all Subsets
  642. Largest substring with same Characters
  643. Maximum value of division of two numbers in an Array
  644. Nambiar Number Generator
  645. Sum of prime numbers without odd prime digits
  646. Maximum number of elements without overlapping in a Line
  647. Find the sum of elements of the Matrix generated by the given rules
  648. Sum of the sums of all possible subsets
  649. Concentric Hexagonal Numbers
  650. Find the diagonal of the Cube
  651. Nearest greater number by interchanging the digits
  652. Find the maximum cost path from the bottom-left corner to the top-right corner
  653. Check whether two points (x1, y1) and (x2, y2) lie on same side of a given line or not
  654. Check if the first and last digit of number N is prime and their sum is less than K
  655. Minimize the cost of buying the Objects
  656. Sum of digits with even number of 1's in their binary representation
  657. Count number of ways to reach destination in a Maze using BFS
  658. Remove duplicates from unsorted array using Set data structure
  659. Minimum operations required to convert a binary string to all 0s or all 1s
  660. Find the smallest positive number which can not be represented by given digits
  661. Program to duplicate Vowels in String
  662. Find the remainder when First digit of a number is divided by its Last digit
  663. Find the remaining balance after the transaction
  664. Print the path between any two nodes of a tree | DFS
  665. Count the number of occurrences of a particular digit in a number
  666. Percentage increase in the volume of cuboid if length, breadth and height are increased by fixed percentages
  667. Count number of ways to get Odd Sum
  668. Convert an unbalanced bracket sequence to a balanced sequence
  669. Maximum String Partition
  670. Count of integers that divide all the elements of the given array
  671. Count number of bits to be flipped to convert A to B | Set-2
  672. Minimum number of Fibonacci jumps to reach end
  673. Print all the permutation of length L using the elements of an array | Iterative
  674. Reversing a Queue using another Queue
  675. Check which player visits more number of Nodes
  676. Reverse every word of the string except the first and the last character
  677. Find F(n) when F(i) and F(j) of a sequence are given
  678. First N terms whose sum of digits is a multiple of 10
  679. Sand Timer Flip Counting Problem
  680. Count of triplets that satisfy the given equation
  681. Lexicographically smallest string of length N and sum K
  682. Minimum increment operations to make K elements equal
  683. Minimum deletions required to make frequency of each letter unique
  684. Count number of substrings of a string consisting of same characters
  685. Check if the bracket sequence can be balanced with at most one change in the position of a bracket
  686. Repeated sum of first N natural numbers
  687. Product of elements in an array having prime frequency
  688. Number of sub arrays with negative product
  689. Find the XOR of first N Prime Numbers
  690. Find the farthest smaller number in the right side
  691. Check if the array has an element which is equal to XOR of remaining elements
  692. Replace elements with absolute difference of smallest element on left and largest element on right
  693. Find the number of pairs such that their gcd is equals to 1
  694. Find number of subarrays with XOR value a power of 2
  695. Summation of floor of harmonic progression
  696. Find the sum of all possible pairs in an array of N elements
  697. Find subarray with given sum with negatives allowed in constant space
  698. Count of numbers in the range [L, R] which satisfy the given conditions
  699. Maximum perimeter of a square in a 2D grid
  700. Check if array contains contiguous integers with duplicates allowed
  701. Find the character made by adding all the characters of the given string
  702. Count of triples (A, B, C) where A*C is greater than B*B
  703. Count of distinct remainders when N is divided by all the numbers from the range [1, N]
  704. Count the number of subsequences of length k having equal LCM and HCF
  705. Count of subsets not containing adjacent elements
  706. Check if the rows of a binary matrix can be made unique by removing a single column
  707. Check if a right-angled triangle can be formed by moving any one of the coordinates
  708. Minimum cost to make all array elements equal
  709. Bitwise AND of the sum of prime numbers and the sum of composite numbers in an array
  710. Queries to check whether all the elements in the given range occurs even number of times
  711. Sum of squares of all Subsets of given Array
  712. Prime Subset Product Problem
  713. Program to find the number from given holes
  714. Find the minimum number of moves to reach end of the array
  715. Absolute difference between the XOR of Non-Prime numbers and Prime numbers of an Array
  716. Find third number such that sum of all three number becomes prime
  717. Angle between 3 given vertices in a n-sided regular polygon
  718. Count of elements which are equal to the XOR of the next two elements
  719. Number of occurrences of a given angle formed using 3 vertices of a n-sided regular polygon
  720. Minimum characters that are to be inserted such that no three consecutive characters are same
  721. Check if the Matrix satisfies the given conditions
  722. Count all substrings having character K
  723. Find all even length binary sequences with same sum of first and second half bits | Iterative
  724. Check if all elements of binary array can be made 1
  725. Find the possible permutation of the bits of N
  726. Convert N to M with given operations using dynamic programming
  727. Count of N-digit numbers in base K with no two consecutive zeroes
  728. Check whether N is a Factorion or not
  729. Count of elements which are not at the correct position
  730. Sentinel Linear Search
  731. Count the pairs in an array such that the difference between them and their indices is equal
  732. Program to calculate area of a rhombus whose one side and diagonal are given
  733. Program to implement FLAMES game
  734. Check if two given Circles are Orthogonal or not
  735. Find the ratio of number of elements in two Arrays from their individual and combined average
  736. Check whether two strings can be made equal by copying their characters with the adjacent ones
  737. Minimum possible number with the given operation
  738. Check if it is possible to move from (0, 0) to (X, Y) in exactly K steps
  739. Find next greater element with no consecutive 1 in it's binary representation
  740. Significant Inversions in an Array
  741. Minimum absolute difference between N and any power of 2
  742. Number of ways in which N can be represented as the sum of two positive integers
  743. Permutations of n things taken all at a time with m things never come together
  744. Minimize the cost of partitioning an array into K groups
  745. Range maximum query using Sparse Table
  746. Number of ways to erase exactly one element in the Binary Array to make XOR zero
  747. Maximum distance between two 1's in Binary representation of N
  748. Minimum steps required to reduce all the elements of the array to zero
  749. Find a pair (n,r) in an integer array such that value of nPr is maximum
  750. Minimum length String with Sum of the alphabetical values of the characters equal to N
  751. Minimum number of additons to make the string balanced
  752. Maximum number of line intersections formed through intersection of N planes
  753. Program to find Nth odd Fibonacci Number
  754. Sum of all the numbers present at given level in Pascal's triangle
  755. Longest Increasing Subsequence using Longest Common Subsequence Algorithm
  756. Sorting objects using In-Place sorting algorithm
  757. Product of values of all possible non-empty subsets of given Array
  758. Sum of the count of number of adjacent squares in an M X N grid
  759. Count of N-bit binary numbers without leading zeros
  760. Find the next fibonacci number
  761. Find missing elements from an Array
  762. Count of elements on the left which are divisible by current element
  763. Find the minimum value of X for an expression
  764. Minimum increment or decrement operations required to make the array sorted
  765. Number of words that can be made using exactly P consonants and Q vowels from the given string
  766. Angle subtended by an arc at the centre of a circle
  767. Represent the given number as the sum of two composite numbers
  768. Maximum number of distinct positive integers that can be used to represent N
  769. Find the previous fibonacci number
  770. Find the quadratic equation from the given roots
  771. Smallest N digit number which is a perfect fourth power
  772. Kth number from the set of multiples of numbers A, B and C
  773. Count of 0s in an N-level hexagon
  774. Maximum of all the integers in the given level of Pascal triangle
  775. Program to print the Diagonals of a Matrix
  776. Count number of ways to arrange first N numbers
  777. Finding the converging element of the diagonals in a square matrix
  778. Generate an array B[] from the given array A[] which satisfies the given conditions
  779. Find X and Y intercepts of a line passing through the given points
  780. Number of edges in a perfect binary tree with N levels
  781. Maximum possible Bitwise OR of the two numbers from the range [L, R]
  782. Check if given path between two nodes of a graph represents a shortest paths
  783. Check if the bracket sequence can be balanced with at most one change in the position of a bracket | Set 2
  784. Program to clear K-th bit of a number N
  785. Sum of subsets of all the subsets of an array | O(3^N)
  786. Longest sub-sequence with a given OR value : O(N) Approach
  787. Find a number X such that (X XOR A) is minimum and the count of set bits in X and B are equal
  788. Form N by adding 1 or 2 in minimum number of operations X where X is divisible by M
  789. Find the Mid-Alphabet for each index of the given Pair of Strings
  790. Number of ways to divide string in sub-strings such to make them in lexicographically increasing sequence
  791. Smallest subarray with GCD as 1 | Segment Tree
  792. Number of subsets with sum divisible by M | Set 2
  793. Maximum sum subarray of even length
  794. Check if two strings can be made equal by swapping one character among each other
  795. N consecutive ropes problem
  796. Count of columns with odd number of 1s
  797. Maximum Bitwise OR pair from a range
  798. Check whether all the substrings have number of vowels atleast as that of consonants
  799. Sum of the updated array after performing the given operation
  800. Reduce every element of the array to it's half retaining the sum zero
  801. Find permutation array from the cumulative sum array
  802. Find the centroid of a non-self-intersecting closed Polygon
  803. Longest subsequence having difference atmost K
  804. Count of primes below N which can be expressed as the sum of two primes
  805. Find all the possible remainders when N is divided by all positive integers from 1 to N+1
  806. Maximum sum combination from the given array
  807. Find the final number obtained after performing the given operation
  808. Check if a symmetric plus is possible from the elements of the given array
  809. Check if given string contains all the digits
  810. Winner in the Rock-Paper-Scissor game using Bit manipulation