i am trying to sort the arrays and then compare if they are equal or not for this problems , but the approach is giving error
#include
#include
#include
using namespace std;
int main(){
char a[50],b[50];
cin>>a>>b;
int a1=strlen(a),b1=strlen(b);
sort(a,a+a1);sort(b,b+b1);
cout<<a<<" "<<b<<endl;
cout<<(a==b);
return 0;
}