Regarding quick sort

hey sir , i want to ask why my code is not running correctly if i am using this function:-
int partion(int a[],int s ,int e )
{

int pivot = a[e];


int i = s-1;

for(int j = s; j < e; j++)
{
if(a[j]<= a[e])

{
    i++;

    swap(a[i],a[j]);
}

}
swap(a[i+1],pivot);

return i+1;

}

but giving me correct result if i am using

int partion(int a[],int s ,int e )
{

int i = s-1;

for(int j =s ;j < e;j++){

if(a[j]<= a[e]) 

{
    i++;

    swap(a[i],a[j]);

}

}
swap(a[i+1],a[e]);

return i+1;

}

hi @discobot send the code on ide.codingblocks.com here its not readable

  1. login
  2. write
  3. save(ctrl + s)
  4. send the url of the page here

Hi! To find out what I can do, say @discobot display help.

sir link to my doubt is :-

https://ide.codingblocks.com/s/684408