Why it is giving wrong ans for this one?

Why it is giving wrong ans for this one?

//As the correct and I have mentioned in comments, Please check that.


//And What If I want the same order as in ip
//How can I solve that too.

hello @cbcao263

what is the given task?

Basically I want to print the characters in the given order along with the frequency.
Order is same as Input order.

u can take help of visited array.

first store frequency of all the character .
then start iterating ur string from start .
if current character is not visited then mark it visited and print its frequency.
if visited then move to next

Bro
How to solve this Question.

Please help.

comparator bana ke try karo isko…

problem ki link hai to mujhe bhej do …

https://www.codechef.com/UCDS2020/problems/MIDLE001
Link yeh hain
Shyd khul jaaye aapke mein.

Comparator mein kaise.

Sir PDF attach nhi kr skta kya, Ya Koi Aur Way share krne ka

Uploaded an Image of the full Question.(thoda zoom krna pdega)
Please check about it.

It is from live contest bro cant help now

Ping me back once contest is over

It’s not a contest bro, College Question hain.
College waale lerhe.
Contest mein ton aaj tak na pucha.
That’s why still struggling with 1* on Codechef and my friends with 3*.
Sab Solution milte nd share krte.

Bro krrhe ho ya, ya khud se hi kru fir.
Bilkul smjh na aarha isme.

mujhe bhi pehle solve karna padega tumhe batane se pehle,to pilhal abhi nahi help kar paunga sorry.

Okayy bro np.
Thanks

Bro sirf ek baat btaa skte ho.
Jab mene map se kiya
Tab ans galt aarhe the
Aisa kyu?
bas wo btaado plz

map saare stored data ko ascending mein sort kar deta hain by default

han uski koi dikkat nhi,
Unordered map check kiya
Wo Alag method se arrange krega…
I just want to know frequency kyu galt aarhi.

Usme kyu issues aarhe.

nahi frequency to sahi aani chaiye, wait mein to newly shared code check kar raha hu

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.