Leetcode 3760 🔥 Maximum Substrings With Distinct Start | Weekly Contest 478 Q2 | Set Approach
Автор: Study Placement
Загружено: 2025-11-30
Просмотров: 69
In this video, I have explained Leetcode 3760 – Maximum Substrings With Distinct Start, which is Question 2 of Weekly Contest 478.
Code:
https://github.com/studyPlacement/Cod...
Graph for Placemenets:
• Graph
Linked List:
• Linked List
Arrays:
• Arrays
Leetcode Contests:
• Leetcode Contests
Neetcode 150 Playlist:
• Neetcode 150 by Study Placement
SDE Sheet for Interview:
• SDE Sheet For Interviews
DP Playlist:
• DP Series | Placement Focused | Study Plac...
Sliding window Playlist:
• Sliding Window
Binary Search Playlist:
• Binary Search
I solved this using a super clean and optimal Set-based approach:
Each substring must start with a distinct character
So the answer is simply the number of distinct characters in the string
This gives a direct O(n) solution.
A small dry run is included to make the idea crystal clear.
Approach Used: HashSet / Distinct Count (O(n))
#leetcode #leetcode3760 #weeklycontest478 #strings #distinctcharacters #hashset #optimalapproach #dryrun #studyplacement #dsa #codinginterview #contest #neetcode150
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: