Striver
Striver
  1. Number of times the largest perfect square number can be subtracted from N
  2. Check if a king can move a valid move or not when N nights are there in a modified chessboard
  3. Range query for Largest Sum Contiguous Subarray
  4. P-Smooth Numbers or P-friable Number
  5. Check if a large number can be divided into two or more segments of equal sum
  6. Count number of paths whose weight is exactly X and has at-least one edge of weight M
  7. Smallest index such that there are no 0 or 1 to its right
  8. Check if the string contains consecutive letters and each letter occurs exactly once
  9. Python Numbers | choice() function
  10. Python string | strip()
  11. Maximum prefix-sum for a given range
  12. Efficient program to print the number of factors of n numbers
  13. Minimum product pair an array of positive Integers
  14. K-th Largest Sum Contiguous Subarray
  15. Minimum and Maximum sum of absolute differences of pairs
  16. Array element moved by k using single moves
  17. Sum of all numbers divisible by 6 in a given range
  18. Minimum element whose n-th power is greater than product of an array of size n
  19. Number of triangles after N moves
  20. Series with largest GCD and sum equals to n
  21. N expressed as sum of 4 prime numbers
  22. Minimal operations to make a number magical
  23. Count of numbers satisfying m + sum(m) + sum(sum(m)) = N
  24. Number of subarrays whose minimum and maximum are same
  25. Print next greater number of Q queries
  26. Distance of closest zero to every element
  27. Count divisors of n that have at-least one digit common with n
  28. k-th missing element in increasing sequence which is not present in a given sequence
  29. Segment tree | Efficient implementation
  30. Split n into maximum composite numbers
  31. Divide an array into k segments to maximize maximum of segment minimums
  32. Print k numbers where all pairs are divisible by m
  33. Maximum even sum subsequence
  34. Given an array and three numbers, maximize (x * a[i]) + (y * a[j]) + (z * a[k])
  35. Number of groups formed in a graph of friends
  36. Pair with maximum GCD from two arrays
  37. Sgn value of a polynomial
  38. String with k distinct characters and no same characters adjacent
  39. Minimum number of bombs
  40. Counting sets of 1s and 0s in a binary matrix
  41. Print digit's position to be removed to make a number divisible by 6
  42. No of pairs (a[j] >= a[i]) with k numbers in range (a[i], a[j]) that are divisible by x
  43. Number of steps to convert to prime factors
  44. Check if an encoding represents a unique binary string
  45. Minimum absolute difference of adjacent elements in a circular array
  46. Number of NGEs to the right
  47. Find n-th term in the series 9, 33, 73,129 ...
  48. Biggest integer which has maximum digit sum in range from 1 to n
  49. Decode a median string to the original string
  50. Smallest root of the equation x^2 + s(x)*x - n = 0, where s(x) is the sum of digits of root x.
  51. Check if a large number is divisibility by 15
  52. Program to find slope of a line
  53. Python | Check if all the values in a list that are greater than a given value
  54. Minimum cost to make array size 1 by removing larger of pairs
  55. Longest subarray not having more than K distinct elements
  56. Number of digits to be removed to make a number divisible by 3
  57. Given N and Standard Deviation, find N elements
  58. Sorting using trivial hash function
  59. Last seen array element (last appearance is earliest)
  60. Prime factors of a big number
  61. Modular Exponentiation in Python
  62. Number of subarrays with maximum values in given range
  63. Maximum array sum with prefix and suffix multiplications with -1 allowed
  64. ord() function in Python
  65. Check if a number is positive, negative or zero using bit operators
  66. sum() function in Python
  67. round() function in Python
  68. Largest number with binary representation is m 1's and m-1 0's
  69. Number of GP (Geometric Progression) subsequences of size 3
  70. Number of n digit stepping numbers
  71. Find n-th term in series 1 2 2 3 3 3 4 4 4 4....
  72. Check if a number is divisible by 17 using bitwise operators
  73. Find n-th term of series 1, 3, 6, 10, 15, 21...
  74. Print lists in Python (4 Different Ways)
  75. Sum of first K even-length Palindrome numbers
  76. Find x, y, z that satisfy 2/n = 1/x + 1/y + 1/z
  77. Largest divisible pairs subset
  78. Circular array
  79. Program to Convert Km/hr to miles/hr and vice versa
  80. Program for volume of Pyramid
  81. Program to find third side of triangle using law of cosines
  82. Narcissistic number
  83. Program to calculate age
  84. Python | Print the initials of a name with last name in full
  85. Smallest integer which has n factors or more
  86. Python | Maximum and minimum element's position in a list
  87. ZigZag Tree Traversal
  88. Print first m multiples of n without using any loop in Python
  89. as_integer_ratio() in Python for reduced fraction of a given rational
  90. log() function in C++
  91. Find x and y satisfying ax + by = n
  92. exp() function C++
  93. Python | Multiply all numbers in the list (3 different ways)
  94. Python sorted() to check if two strings are anagram or not
  95. Python | Check if a Substring is Present in a Given String
  96. Python set to check if string is panagram
  97. Python | Sort Tuples in Increasing Order by any key
  98. First occurrence of a digit in a given fraction
  99. Minimize the absolute difference of sum of two subsets
  100. Python program to print checkerboard pattern of nxn using numpy
  101. Python | Check if two lists have at-least one element common
  102. Python | Check whether two lists are circularly identical
  103. Python | Maximum sum of elements of list in a list of lists
  104. Python | Get unique values from a list
  105. Extending a list in Python (5 different ways)
  106. Python | Print list after removing element at given index
  107. Python | Numbers in a list within a given range
  108. Python | Remove leading zeros from an IP address
  109. Python | Convert a list of characters into a string
  110. Intersection() function Python
  111. Union() function in Python
  112. isdisjoint() function in Python
  113. set copy() in python
  114. string capitalize() in Python
  115. join() function in Python
  116. Python | Print all sublists of a list
  117. Python | Print all the common elements of two lists
  118. Python | Find missing and additional values in two lists
  119. Python Set symmetric_difference()
  120. Python | Iterate over multiple lists simultaneously
  121. Edit Distance | DP using Memoization
  122. Python string | isdecimal()
  123. Python string | isalnum()
  124. Python string | swapcase()
  125. Find the number of times every day occurs in a month
  126. Longest Increasing consecutive subsequence
  127. Python string length | len()
  128. Python String | count()
  129. Python String | min()
  130. Python String | max()
  131. Python | Check if there are K consecutive 1's in a binary number
  132. Python Set | update()
  133. Python String | replace()
  134. Sum of f(a[i], a[j]) over all pairs in an array of n integers
  135. Python math function | sqrt()
  136. Python math function | modf()
  137. Python list function | count()
  138. Python math function | hypot()
  139. Python list | reverse()
  140. Python list remove()
  141. Python list | insert()
  142. Check whether triangle is valid or not if sides are given
  143. Python list | index()
  144. Python list | pop()
  145. Count of different ways to express N as the sum of 1, 3 and 4
  146. Python dictionary | values()
  147. Check if it is possible to transform one string to another
  148. Largest number that is not a perfect square
  149. Balanced expressions such that given positions have opening brackets
  150. LCS formed by consecutive segments of at least length K
  151. Minimum sum of multiplications of n numbers
  152. XOR of two numbers after making length of their binary representations equal
  153. Fibbinary Numbers (No consecutive 1s in binary)
  154. Number of unique triplets whose XOR is zero
  155. Maximize the sum of selected numbers from an array to make it empty
  156. Print bitwise AND set of a number N
  157. Sum over Subsets | Dynamic Programming
  158. Python | tuple() Function
  159. Number of ordered pairs such that (Ai & Aj) = 0
  160. Maximum number of segments of lengths a, b and c
  161. Minimum removals from array to make max - min <= K
  162. toDegrees() and toRadians() in Java
  163. rint() in Java (Rounding to int)
  164. java.lang.Math.atan2() in Java
  165. Trigonometric Functions in Java with Examples
  166. Dynamic Programming on Trees | Set-1
  167. Dynamic Programming on Trees | Set 2
  168. Python | int() function
  169. Arraylist removeRange() in Java with examples
  170. ArrayList get(index) method in Java with examples
  171. Arraylist lastIndexOf() in Java with example
  172. Arraylist.contains() in Java
  173. Find k numbers which are powers of 2 and have sum N | Set 1
  174. Minimum steps to reach any of the boundary edges of a matrix | Set-2
  175. ArrayList trimToSize() in Java with example
  176. ArrayList isEmpty() in Java with example
  177. atan2() function in Python
  178. ArrayList clear() in Java with examples
  179. Number of indexes with equal elements in given range
  180. Inclusion Exclusion principle and programming applications
  181. Smallest even digits number not less than N
  182. Largest even digit number not greater than N
  183. Number of subarrays with m odd numbers
  184. PHP | substr_count() Function
  185. PHP | bin2hex() Function
  186. PHP | chr() Fucntion
  187. PHP | strchr() Function
  188. PHP | strrev() Function
  189. Reach A and B by multiplying them with K and K^2 at every step
  190. Minimal moves to form a string by adding characters or appending string itself
  191. PHP | str_shuffle() Function
  192. PHP | strtr() Function
  193. PHP | expm1() Function
  194. PHP | array_merge_recursive() Function
  195. PHP | array_product() Function
  196. PHP | sort() Function
  197. PHP | list() Function
  198. PHP | rsort() Function
  199. PHP | array_uintersect() Function
  200. Leftover element after performing alternate Bitwise OR and Bitwise XOR operations on adjacent pairs
  201. PHP | array_diff_uassoc() Function
  202. PHP | next() Function
  203. Reaching a point using clockwise or anticlockwise movements
  204. Largest palindromic number by permuting digits
  205. std::cbrt() in C++
  206. PHP | strcoll() Function
  207. vector :: assign() in C++ STL
  208. Count numbers formed by given two digit with sum having given digits
  209. Count elements which divide all numbers in range L-R
  210. Find ceil of a/b without using ceil() function
  211. Check if any interval completely overlaps the other
  212. Check if every index i has an index j such that sum of elements in both directions are equal
  213. Printing longest Increasing consecutive subsequence
  214. Longest subarray with only one value greater than k
  215. Count number of smallest elements in given range
  216. unordered_map bucket() in C++ STL
  217. unordered_map begin() in C++
  218. Subarray whose sum is closest to K
  219. Memoization (1D, 2D and 3D)
  220. Count of elements of an array present in every row of NxM matrix
  221. Queries to insert, delete one occurrence of a number and print the least and most frequent element
  222. Print levels with odd number of nodes and even number of nodes
  223. Count number of triplets with product equal to given number with duplicates allowed | Set-2
  224. Longest Common Subsequence | DP using Memoization
  225. Sudo Placement[1.5] | Second Smallest in Range
  226. Sudo Placement[1.5] | Partition
  227. Sudo Placement[1.5] | Wolfish
  228. Smallest divisor D of N such that gcd(D, M) is greater than 1
  229. Smallest Greater Element on Right Side
  230. Sudo Placement[1.7] | Greatest Digital Root
  231. Longest subsequence whose average is less than K
  232. Print all the cycles in an undirected graph
  233. Queries for DFS of a subtree in a tree
  234. Queries for M-th node in the DFS of subtree
  235. N-th prime factor of a given number
  236. Split array to three subarrays such that sum of first and third subarray is equal and maximum
  237. Print the last occurrence of elements in array in relative order
  238. Find four factors of N with maximum product and sum equal to N | Set-2
  239. Print direction of moves such that you stay within the [-k, +k] boundary
  240. N-th term in the series 1, 11, 55, 239, 991,....
  241. Number of ways to change the XOR of two numbers by swapping the bits
  242. Pairs with GCD equal to one in the given range
  243. Product of lengths of all cycles in an undirected graph
  244. Triplet with no element divisible by 3 and sum N
  245. Smallest power of 2 which is greater than or equal to sum of array elements
  246. Program to calculate Bitonicity of an Array
  247. Maximum occurred integer in n ranges | Set-2
  248. Queries to check if a number lies in N ranges of L-R
  249. Find any pair with given GCD and LCM
  250. Minimum removals from array to make GCD greater
  251. First triangular number whose number of divisors exceeds N
  252. Count number of integers less than or equal to N which has exactly 9 divisors
  253. Number of values of b such that a = b + (a^b)
  254. Minimum increment in the sides required to get non-negative area of a triangle
  255. Rearrange the string to maximize the number of palindromic substrings
  256. Queries to add, remove and return the difference of maximum and minimum.
  257. Queries for number of elements on right and left
  258. Maximize the number of subarrays with XOR as zero
  259. Print N lines of 4 numbers such that every pair among 4 numbers has a GCD K
  260. Number of distinct integers obtained by lcm(X, N)/X
  261. Tree with N nodes and K leaves such that distance between farthest leaves is minimized
  262. N-th character in the string made by concatenating natural numbers
  263. Lexicographically largest string formed from the characters in range L and R
  264. Number of segments where all elements are greater than X
  265. Longest subarray in which all elements are greater than K
  266. Count subarrays with all elements greater than K
  267. Count subarrays consisting of only 0's and only 1's in a binary array
  268. Smallest prime divisor of a number
  269. Paths with maximum number of 'a' from (1, 1) to (X, Y) vertically or horizontally
  270. Steps to reduce N to zero by subtracting its most significant digit at every step
  271. Print all numbers less than N with at-most 2 unique digits
  272. Check if the array has an element which is equal to sum of all the remaining elements
  273. Find the player who rearranges the characters to get a palindrome string first
  274. XOR of path between any two nodes in a Binary Tree
  275. Search a node in Binary Tree
  276. Print path between any two nodes in a Binary Tree
  277. Check if two nodes are in same subtree of the root node
  278. Find all numbers that divide maximum array elements
  279. Number of leaf nodes in the subtree of every node of an n-ary tree
  280. Count pairs (A, B) such that A has X and B has Y number of set bits and A+B = C
  281. Print all the levels with odd and even number of nodes in it | Set-2
  282. Level Order Predecessor of a node in Binary Tree
  283. Level Order Successor of a node in Binary Tree
  284. Print numbers in descending order along with their frequencies
  285. Check if a triplet with given sum exists in BST
  286. Level with maximum number of nodes using DFS in a N-ary tree
  287. Maximum sum of nodes in Binary tree such that no two are adjacent | Dynamic Programming
  288. Check if moves in a stack or queue are possible or not
  289. Minimum in an array which is first decreasing then increasing
  290. Minimum steps to reach any of the boundary edges of a matrix | Set 1
  291. Ways to fill N positions using M colors such that there are exactly K pairs of adjacent different colors
  292. Predict the winner of the game | Sprague-Grundy
  293. Find minimum x such that (x % k) * (x / k) == n | Set-2
  294. Count Subarrays with Consecutive elements differing by 1
  295. Count numbers in a range that are divisible by all array elements
  296. Assign weights to edges such that longest path in terms of weights is minimized
  297. Append odd position nodes in reverse at the end of even positioned nodes in a Linked List
  298. Shortest root to leaf path sum equal to a given number
  299. Decrypt a string according to given rules
  300. Check if a word exists in a grid or not
  301. Minimum number of sets with numbers less than Y
  302. Minimum number N such that total set bits of all numbers from 1 to N is at-least X
  303. Count pairs of parentheses sequences such that parentheses are balanced
  304. Minimum steps required to convert X to Y where a binary matrix represents the possible conversions
  305. Distribute N candies among K people
  306. Check if it is possible to get back to 12'0 clock only by adding or subtracting given seconds
  307. Minimize the number of replacements to get a string with same number of 'a', 'b' and 'c' in it
  308. Count number of sub-sequences with GCD 1
  309. Count the numbers that can be reduced to zero or less in a game
  310. Minimum replacements to make adjacent characters unequal in a ternary string
  311. Minimum replacements such that the difference between the index of the same characters is divisible by 3
  312. Find two numbers whose divisors are given in a random order
  313. Maximize the subarray sum after multiplying all elements of any subarray with X
  314. Find M-th number whose repeated sum of digits of a number is N
  315. Length of the longest alternating subarray
  316. Check if a string can be converted to another string by replacing vowels and consonants
  317. Minimum replacements to make adjacent characters unequal in a ternary string | Set-2
  318. Minimize the sum of squares of sum of N/2 paired formed by N numbers
  319. Print the lexicographically smallest BFS of the graph starting from 1
  320. DP on Trees | Set-3 ( Diameter of N-ary Tree )
  321. Find a positive number M such that gcd(N^M, N&M) is maximum
  322. Select numbers in such way to maximize the amount of money
  323. Number of unique paths in tree such that every path has a value greater than K
  324. Minimum cost to make two strings same
  325. Minimum matches the team needs to win to qualify
  326. Maximum subarray sum by flipping signs of at most K array elements
  327. Number of quadruples where the first three terms are in AP and last three terms are in GP
  328. Maximize the summation of numbers in a maximum of K moves in range [L, R]
  329. Print all the sum pairs which occur maximum number of times
  330. Ways to form a group from three groups with given constraints
  331. Largest subset of rectangles such that no rectangle fit in any other rectangle
  332. Longest path in a directed Acyclic graph | Dynamic Programming
  333. Print the balanced bracket expression using given brackets
  334. Minimum cost to form a number X by adding up powers of 2
  335. Maximum average of a subarray of size of atleast X and atmost Y
  336. Maximize the number of sum pairs which are divisible by K
  337. Find d to maximize the number of zeros in array c[] created as c[i] = d*a[i] + b[i]
  338. Remove first adjacent pairs of similar characters until possible
  339. Search an element in given N ranges
  340. Check if matrix can be converted to another matrix by transposing square sub-matrices
  341. Position of the K-th set bit in a number
  342. Minimum steps to delete a string by deleting substring comprising of same characters
  343. Maximum sum from three arrays such that picking elements consecutively from same is not allowed
  344. Print the longest prefix of the given string which is also the suffix of the same string
  345. Minimum cost to reach end of array array when a maximum jump of K index is allowed
  346. Queries to return the absolute difference between L-th smallest number and the R-th smallest number
  347. Number of ways of scoring R runs in B balls with at most W wickets
  348. Perform K of Q queries to maximize the sum of the array elements
  349. Number of ways in which the substring in range [L, R] can be formed using characters out of the range
  350. Maximum volume of cube for every person when edge of N cubes are given
  351. Minimum number operations required to convert n to m | Set-2
  352. Maximum consecutive one’s (or zeros) in a binary circular array
  353. Find the original matrix when largest element in a row and a column are given
  354. Find the value of N when F(N) = f(a)+f(b) where a+b is the minimum possible and a*b = N
  355. Number of ways of choosing K equal substrings of any length for every query
  356. Delete odd and even numbers at alternate step such that sum of remaining elements is minimized
  357. Length of the longest substring with no consecutive same letters
  358. Find the number of players who roll the dice when the dice output sequence is given
  359. Predict the winner of the game on the basis of absolute difference of sum by selecting numbers
  360. Queries to answer the number of ones and zero to the left of given index
  361. Program to find the maximum difference between the index of any two different numbers
  362. Split the array elements into strictly increasing and decreasing sequence
  363. Queries to check if substring[L...R] is palindrome or not
  364. Count pairs of non-overlapping palindromic sub-strings of the given string
  365. Check if matrix A can be converted to B by changing parity of corner elements of any submatrix
  366. Number of triangles possible with given lengths of sticks which are powers of 2
  367. Number of subsequences with zero sum
  368. Count of sub-strings that do not consist of the given character
  369. Find the maximum possible value of a[i] % a[j] over all pairs of i and j
  370. Maximize the maximum subarray sum after removing atmost one element
  371. Queries to update a given index and find gcd in range
  372. Print all numbers whose set of prime factors is a subset of the set of the prime factors of X
  373. Highest power of a number that divides other number
  374. Maximum elements which can be crossed using given units of a and b
  375. Minimum value of X to make all array elements equal by either decreasing or increasing by X
  376. Sum of the series 1, 2, 4, 3, 5, 7, 9, 6, 8, 10, 11, 13.. till N-th term
  377. Check if a number from every row can be selected such that xor of the numbers is greater than zero
  378. Find the minimum sum of distance to A and B from any integer point in a ring of size N
  379. Maximum length palindrome that can be created with characters in range L and R
  380. Check if string can be made lexicographically smaller by reversing any substring
  381. Given two arrays count all pairs whose sum is an odd number
  382. Print steps to make a number in form of 2^X - 1
  383. Maximize the given number by replacing a segment of digits with the alternate digits given
  384. Queries to answer the X-th smallest sub-string lexicographically
  385. Count unique numbers that can be generated from N by adding one and removing trailing zeros
  386. Find the lexicographically smallest sequence which can be formed by re-arranging elements of second array
  387. Longest alternative parity subsequence
  388. Generate an array of K elements such that sum of elements is N and the condition a[i] < a[i+1] <= 2*a[i] is met | Set 2
  389. Count Pairs from two arrays with even sum
  390. GCD from root to leaf path in an N-ary tree
  391. Count the number of primes in the prefix sum array of the given array
  392. Rearrange the array to maximize the number of primes in prefix sum of the array
  393. Find number from its divisors
  394. Check if the given matrix is increasing row and column wise
  395. Check if the given Prufer sequence is valid or not
  396. Print an N x M matrix such that each row and column has all the vowels in it
  397. Print the degree of every node from the given Prufer sequence
  398. Print the node with the maximum degree in the prufer sequence
  399. Minimum length subarray of 1s in a Binary Array
  400. Find row with maximum and minimum number of zeroes in given Matrix
  401. Smallest number greater or equals to N such that it has no odd positioned bit set
  402. Greatest contiguous sub-array of size K
  403. Count of strings in the first array which are smaller than every string in the second array
  404. Number of hours after which the second person moves ahead of the first person if they travel at a given speed
  405. Arrange N elements in circular fashion such that all elements are strictly less than sum of adjacent elements
  406. Longest subsequence such that every element in the subsequence is formed by multiplying previous element with a prime
  407. Divide the array in K segments such that the sum of minimums is maximized
  408. Sum of the distances from every node to all other nodes is maximum
  409. Queries to print the character that occurs the maximum number of times in a given range
  410. Subsequence X of length K such that gcd(X[0], X[1]) + (X[2], X[3]) + ... is maximized
  411. Maximum Bitwise AND value of subsequence of length K
  412. Product of Primes of all Subsets
  413. Sum of the sums of all possible subsets
You may use GeeksforGeeks CONTRIBUTE portal to help other geeks. For more info, please refer this.