Back to Browse

Solving LeetCode 2418: Sort the People | C++ Mapping & Sorting Tutorial

8 views
Apr 29, 2026
3:58

In this video, I walk through a complete solution for LeetCode problem 2418, "Sort the People," using C++. We’ll explore how to efficiently map heights to names and sort them in descending order to achieve the desired output. What we cover: - Problem analysis and constraints - Using std::map for automatic sorting by keys - Iterating and reversing vectors for descending order - Live coding and testing against custom test cases 🌐 My Profiles: 💻 LeetCode: https://leetcode.com/u/Dev_D_Patel/ 🚀 GitHub: https://github.com/Dev1822 🔗 LinkedIn: / dev-daxin-patel ✨ Portfolio: https://dev-d-patel-portfolio.vercel.... 📩 Open for collaborations & opportunities #LeetCode #C++ #CodingChallenge #ProblemSolving #TechEducation #DataStructures #Algorithms

Download

1 formats

Video Formats

360pmp45.2 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Solving LeetCode 2418: Sort the People | C++ Mapping & Sorting Tutorial | NatokHD