using namespace std;
int swap(int *x,int *y)
int count1(int a)
int solve(int a)
if(t==0 || t==2)
Have you considered taking single digit numbers both, and a mix of single and double digit? I think its taking the zero of single digit numbers in the array and swapping to create a two digit number.
No need of such bulky code. Only four lines are enough. Look at my code. Comments are there for reference. Hpoe it helps.
Thank you sir but I want to know about the test case that is not passed by my code.
Yes sir but it gives correct ans at all. Can you suggest some test case which is not fulfilled by my code?
see in your code
test case is 3 5
its answer should be 8 but your code is giving it as 53
see the mistake and rectify it