In some questions, we are required to use another vector/array which may or may not be 2 dimensional. We usually name it as “dp”. Why is so that it is named “dp” and not any other name?
For example, in for-loop we use “i” for the short form of “index”.
What is the relation of “dp” here?
Thank You
@blanotme
dp stands for dynamic programming
its a concept that we use to solve advance dsa problems .
but there is not any compulsion to use name as dp .
u can use your name or any other word if u want .
But we generally used dp so that the reader can understand that he/she have applied dp concept to solve this problem.
1 Like