Can u pls send bottom up approach code

i have designed the code , i want to check my code
, pls do tell time complexity of the code

Hello @Shubham800 you can see this code it is well commented:

bottom up will have O(n^2) complexity , what will be the complexity for top-down approach ???

@Shubham800 yes for both the approach the time complexity will be O(N^2).

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.