Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Generate all unique partitions of an integer

Algorithm to generate all unique partitions of an integer in Typescript

  • Difficulty Level : Hard

Given a positive integer n, generate all possible unique ways to represent n as sum of positive integers. 

Examples: 

Input: n = 2 Output: 2 1 1

Input: n = 3 Output: 3 2 1 1 1 1 Note: 2+1 and 1+2 are considered as duplicates.

Input: n = 4 Output: 4 3 1 2 2 2 1 1 1 1 1 1

About

Algorithm to generate all unique partitions of an integer in Typescript

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages