educative.io

Educative

How did we determine space complexity?

O(tn) is the number of possible combinations, but each combination is a list of numbers. How is this presented as space complexity of O(tn) instead of something like O(tns) where O(s) is the number of values in the combination?


Course: Grokking Coding Interview Patterns in Java - Learn Interactively
Lesson: https://www.educative.io/courses/grokking-coding-interview-patterns-java/solution-combination-sum