Can you please share the code for Wines Problem Bottom-Up Approach.
Doubt in Wines Problem Bottom-Up Approach
Coding Blocks IDE
I have one doubt in the above code shared in the video for Bottom-up approach:
Here we have declared a 2-d dp array and have not initialized its elements to zero but when we print its elements then every non initialized element is printed 0. Why??
no reason behind it, some compiler by default takes 0.
btw the theory says uninitialised variables/array (excluding static, global) can take any garbage value.
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.