Skip to content

dhirajbag/coding-solns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Just another archive of solutions to some interesting DSA problems.

There is an array of n non-negative integers, arr. In one operation, some positive integer x is chosen and 1 subtracted from all the numbers of the array which are greater than or equal to x. Find the number of different final arrays possible after the operation is applied 0 or more times. Return the answer modulo (10^9 + 7).

Note:

  • Different values of x can be chosen for different operations.
  • Two final arrays a and b are considered different if there is at least one index i such that a[i] != b[i]

Constraints:

  • 1 <= n <= 10^5
  • 0 <= arr[i] <= 10^5

About

Just an archive

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages