void function(int start, int end){
    if (start > end) return;
    int x= a[end]-a[start];
    a[start] = a[start] + x;
    a[end] = a[end] - x;
    function(start+1, end-1);
}

main(){
    scanf("%s", &a[0]);
    int len = strlen(a);
    function(0,len-1);
    printf("%s\n", a);
}



-- 
Ankit Agarwal
Computer Science & Engg.
Integrated Dual Degree, V yr
Department of Electronics & Computer Engineering
Indian Institute of Technology Roorkee
Ph. no. +91-9580098805

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to