Understanding the error terminate called after throwing an instance of ‘std::length_error’ what(): basic_string::_M_replace_aux
this is error that is coming terminate called after throwing an instance of ‘std::length_error’ what(): basic_string::_M_replace_aux this is the code i wrote `class Solution { public: string frequencySort(string s) { priority_queue<pair<int, char>> pq; unordered_map<char, int> hm; for (char c : s) { hm[c]++; } for (const auto& entry : hm) { pq.push(make_pair(entry.second, entry.first)); } string […]