Sorry you have provided solution to me for inverse of the array but it gives garbade value

#include<bits/stdc++.h>
using namespace std;

int main() {
string s;
cin>>s;

int a[s.length()];
int k = 1;
for(int i=s.length()-1;i>=0;i--){
	int place = s[i]-'0' - 1;
	// cout<<place<<endl;
	a[place] = k++;
}

for(int i=s.length()-1;i>=0;i--)cout<<a[i];
return 0;

}
i wnat to know where i am wrong in my code this the code provided by you but i want to knoe where i am wrong in my code that i have provided you yesterday

@rathidevesh906_1dcc73a061c159bb please check one more its passing all test cases https://hack.codingblocks.com/app/practice/1/698/problem

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.