Complexity issue

what is the space complexity of minimum coin change problem is it O(N) or O(N+T)?

Hey @Rj.25
It is 0(N) for india coin change and 0( N * Sum ) for DP coin change

If your doubt is resolved please mark it as closed.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

how its O(N) in case of indian coin change .since the coins array is array given us as input.how does that count in extra space we have used in greedy approach for indian change.if u have not considered the space of coins array on what basis have you given the time complexity as O(N) for indian coin change?

how the space complexity is O(N*sum) in case of dp coin change.please explain in detail.also tell what N and sum represent?

@Rj.25 There can be a 0(n) solution or 0(nsum) also. It depends on your solution what will be the space complexity.
In 0(n
sum) approach the n represent number of different coins and sum represent the value that you have to make.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.