Closed saritapatel8770 closed 2 years ago
@saritapatel8770 I want to solve this problem could you assign me
@saritapatel8770 hey, solved this
Hey @saritapatel8770 I solved this problem but when I was trying to access map's element then it was giving me an compiler error so I used different method. But could you tell me what was wrong in this?
the error was :
Line 10: Char 33: error: no member named 'second' in 'std::__cxx11::basic_string
1 error generated.
The code was :
map<int, string> mp;
for(int i=0;i<names.size();i++){
mp[heights[i]]= names[i];
}
vector<string> ans;
for(int i=names.size()-1;i>=0;i--){
ans.push_back(mp[i].second); // here it is giving error
}
return ans;
}
};
@saritapatel8770 was my PR successfully merged? or it's invalid.. why so?
Okay, got it I push empty file .. I forgot to save the file in vs code that's why this has happed .. could you give me another chaance
hey could you check my PR now
Link - https://leetcode.com/problems/sort-the-people/