Upstox interview question

Knapsack, binary search tree, DP