Can we do Bubble Sorting like this

Can we write bubble sort like this:

for (int i=n; i>0; i–)
{
for (int j=0; j<i-1; j++)
{
if( a[j]>a[j+1] )
{ swap(a[j],a[j+1]); }
}

}

will this be considered as bubble sort??

Hey @sahilkhan2312000131
Yes we can call it bubble sort.