Please check my code why is it not running
Longest Consecutive Subsequence 1 - Code Problem
The questions ask about subsequence. In Subsequence the order of the elements matter and they need to be the same as they are in the given array.
Arr = {3,2,1}
1,2,3 is not a subsequence
1,3 is not a subsequence
3,1 is a subseuqnce
3,2,3 is a subsequence
the question is this…i didnt get what you said…i am not able to relate tha
Ohh ok, I misread the question.
I have made some changes. first about MAX and MIN, and you were not returning the ans;
#ifndef ONLINE_JUDGE
freopen(“input.txt”, “r”, stdin);
freopen(“output.txt”, “w”,stdout);
#endif
why did you did this??
To read and write from the text files namely inpu.txt and output.txt. if and only if ONLINE_JUDGE is not defined i.e on my computer
okay!..
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.