I am trying to solve the question. if I solve for one test case another arises. Please mark out the error in my code.
Equal - interviewbit
@mikkyimran
you had to check if v vector was not empty. as it might remain empty and then it would get assign to ans
if(ans.size()==0){
ans = v;
}
else if (!v.empty() and ans > v){
ans = v;
}