https://onlinegdb.com/BkG-qE9VD

plz check and tell for what test cases is my code failing and what is wrong in logiic.

From next time, please share the link in content, so that it is easier to click.

It’s okay for now. (I’ll see and reply)

	for(int i=0;i<n;i++)
	{
		a[i]=a[i+1]-a[i];
	}

loop should only run till n - 1.