I've written a program that calculates all of the palindrome numbers in the given range, but the code is slightly slower than needed. I've tried to improve algorithmic complexity to the best of my abilities, but still  overhead over passing solution (1 second). Is it possible to improve the runtime performance (in time) of the code?\$n\$ - number of tests\$a, b\$ - range in which I need to calculate number of palindromesHere is the code:#include<stdio.h>int ifpalin(int g){    int rev=0;    int tmp=g;    while(tmp>0)    {        rev=rev*10+(tmp%10);        tmp=tmp/10;    }    if(rev==g)        return 1;    else        return 0;}int findpalin(int a1,int b1){    int sm=0;    for(int i=a1;i<=b1;i++)    {      if  (ifpalin(i)==1)        sm++;    }    printf(%d,sm);    printf(\n);    return 0;}int main(){int a,b,n;    scanf(%d,&n);    for(int i=0;i<n;i++)    {        scanf(%d,&a);        scanf(%d,&b);        findpalin(a,b);    }    return 0;}
Calculate the number of palindrome numbers in the given ranges
performance;algorithm;c;time limit exceeded;palindrome