A different approach for wines problem

shouldn’t the table be like
|2 8 23|
0 3 13|
0 0 5|
i mean when (i<j) it is zero but for (i,i) ie (0,0),(1,1),(2,2) i consider i have only one element ie (2or3or5) in the wine array then for (0,1) i consider having two elements in the wine array ie(2,3) then the ans is (2x1)+(3x2) or (3x1)+(2x2) the one case gives the larger ans ie 8 so (0,1)=8 similarly for (1,2) i consider having (3,5) then (3x1)+(5x2) or (5x1)+(3x2) so the ans would be first case ie 13 then for (0,2) from 8,13. so it should be either (8+(53)) or (13+(23)) the larger one is 23 so 23 is the ans .

i dont understand how the faculty arrived tp that table .is my approach correct

@neha_153
Please tell the testcase you’re talking about here

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.