I know I am getting wrong answer because I have written push_back for vector at wrong place. Where should I write that statement?
How to correct my code?
hey @J19APPPP0007, you appraoch is not correct here. You have made returntype as int, also returning the value but not using it. This question is pure DP question with a proper approach and that approach was taught too you in your Lecture. Please go through them.
In case any query, feel free to ask.