У нас вы можете посмотреть бесплатно LeetCode 178- Rank Scores (Python and SQL) [EASY] или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
🧠 Don’t miss out! Get FREE access to my Skool community — packed with resources, tools, and support to help you with Data, Machine Learning, and AI Automations! 📈 https://www.skool.com/data-and-ai-aut... Learn how to solve one of the most common ranking problems on LeetCode—Rank Scores—using both SQL and Python (Pandas). This step-by-step guide walks you through logic, code, and tips to help you understand ranking without gaps and ace your coding interviews! Leetcode 178 SQL and Python solution: https://leetcode.com/problems/rank-sc... Code: https://ryanandmattdatascience.com/le... 🚀 Hire me for Data Work: https://ryanandmattdatascience.com/da... 👨💻 Mentorships: https://ryanandmattdatascience.com/me... 📧 Email: ryannolandata@gmail.com 🌐 Website & Blog: https://ryanandmattdatascience.com/ 🖥️ Discord: / discord 📚 *Practice SQL & Python Interview Questions: https://stratascratch.com/?via=ryan 📖 *SQL and Python Courses: https://datacamp.pxf.io/XYD7Qg 🍿 WATCH NEXT LeetCode Playlist: • Leetcode Data Science Interview Questions LeetCode 511: • LeetCode 511- Game Play Analysis 1 (Pytho... LeetCode 182: • Leetcode 182 - Duplicate Emails (Python an... LeetCode 180: • LeetCode 180 - Consecutive Numbers (Python... In this video, I break down LeetCode problem 178, "Rank Scores," and show you how to solve it using both SQL and Python Pandas. This is a medium-difficulty question that focuses on ranking scores from highest to lowest while handling ties correctly using dense ranking. I walk through the key requirements: scores should be ranked from highest to lowest, ties receive the same ranking, and after a tie, the next ranking should be the next consecutive integer with no gaps. The solution uses the DENSE_RANK function in SQL and the rank method with dense parameter in Pandas. For the SQL solution, I demonstrate how to build a clean CTE (Common Table Expression) to create the ranking, then select and order the final results. I explain why dense ranking is the correct approach for this problem and share practical tips about when to use CTEs in interview situations. The Python Pandas solution is even more straightforward, requiring just three lines of code to create the rank column, sort the values, and return the final dataframe. I also cover common mistakes to avoid, like using SELECT * in production code, and explain the difference between ranking by score versus ranking by rank. Whether you're preparing for data analyst, data scientist, or analytics engineer interviews, this step-by-step walkthrough will help you understand ranking functions and solve similar problems with confidence. TIMESTAMPS 00:00 Problem Introduction & Overview 01:00 SQL Solution - Building the CTE 02:30 Using Dense Rank Function 04:00 SQL Solution Complete & Testing 05:00 Python Solution with Pandas 06:30 Final Python Code & Wrap-up OTHER SOCIALS: Ryan’s LinkedIn: / ryan-p-nolan Matt’s LinkedIn: / matt-payne-ceo Twitter/X: https://x.com/RyanMattDS Who is Ryan Ryan is a Data Scientist at a fintech company, where he focuses on fraud prevention in underwriting and risk. Before that, he worked as a Data Analyst at a tax software company. He holds a degree in Electrical Engineering from UCF. Who is Matt Matt is the founder of Width.ai, an AI and Machine Learning agency. Before starting his own company, he was a Machine Learning Engineer at Capital One. *This is an affiliate program. We receive a small portion of the final sale at no extra cost to you.