ycliper

Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
Скачать

Maximum Score From Removing Substrings | 2 Approaches | With Proof | Leetcode 1717

Автор: codestorywithMIK

Загружено: 2024-07-12

Просмотров: 16504

Описание: iPAD PDF Notes - https://github.com/MAZHARMIK/Intervie...
Whatsapp Community Link : https://www.whatsapp.com/channel/0029...
This is the 19th Video of our Playlist "Stack : Popular Interview Problems" by codestorywithMIK

Using Approach-2 (i and j pointer approach), you can solve this problem as well - https://leetcode.com/problems/check-i...

In this video we will try to solve a very good Stack based problem : Maximum Score From Removing Substrings | 2 Approaches | With Proof | Leetcode 1717 | codestorywithMIK
We will also prove why the solution works.

I will explain the intuition so easily that you will never forget and start seeing this as cakewalk EASYYY.

Problem Name : Maximum Score From Removing Substrings | 2 Approaches | With Proof | Leetcode 1717 | codestorywithMIK
Company Tags : META, AMAZON, GOOGLE
My solutions on Github(C++ & JAVA) : https://github.com/MAZHARMIK/Intervie...
Leetcode Link : https://leetcode.com/problems/maximum...


My DP Concepts Playlist :    • Roadmap for DP | How to Start DP ? | Topic...  
My Graph Concepts Playlist :    • Graph Concepts & Qns - 1 : Graph will no m...  
My Segment Tree Concepts Playlist :    • Segment Tree | Introduction | Basics | Bui...  
My Recursion Concepts Playlist :    • Introduction | Recursion Concepts And Ques...  
Trie Playlist -    • Word Search II | Leetcode 212 | Detailed |...  
Difference Array Technique: Concepts & Qns :    • Introduction | What | How | Difference Arr...  
Monotonic Data Structure Concepts & Qns :    • Monotonic Data Structures Concepts & Qns  
My GitHub Repo for interview preparation : https://github.com/MAZHARMIK/Intervie...
Instagram :   / codestorywithmik  
Facebook :   / 100090524295846  
Twitter :   / cswithmik  
Subscribe to my channel :    / @codestorywithmik  

╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
╠╗║╚╝║║╠╗║╚╣║║║║║═╣
╚═╩══╩═╩═╩═╩╝╚╩═╩═╝

Summary :
Identifies the substring (maxStr) that yields the higher score (max(x, y)) and removes it from s using the removeSubstring function.
The removeSubstring function uses a stack to track characters, removing pairs that match maxStr.
The score is updated by the number of removed pairs multiplied by the higher score value.
The remaining string from the first pass is processed similarly to remove the substring (minStr) that yields the lower score (min(x, y)).
The score is again updated based on the number of removed pairs.

Approach 2: Without Stack
Similar to the first approach, it identifies and removes the maxStr substring from s.
Uses two pointers technique to keep track of valid characters in the string.
Updates the score based on the number of removed pairs multiplied by the higher score value.
The modified string from the first pass is processed to remove the minStr substring.
Score is updated based on the number of removed pairs.


✨ Timelines✨
00:00 - Introduction
00:23 - Problem Explanation
02:11 - Approach-1 Thought Process (Using Stack)
08:49 - Proof of Approach-1
20:10 - Coding Approach-1
26:26 - Approach-2 Thought Process (Without Stack)
37:50 - Coding Approach-2


#MIK #mik #Mik
#coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge #leetcodequestions #leetcodechallenge #hindi #india #coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge #leetcodequestions #leetcodechallenge #hindi #india #hindiexplanation #hindiexplained #easyexplaination #interview#interviewtips #interviewpreparation #interview_ds_algo #hinglish #github #design #data #google #video #instagram #facebook #leetcode #computerscience #jobinterview #github #designthinking #learningtogether #growthmindset #digitalcontent #techcontent #socialmediagrowth #contentcreation #instagramreels #codestorywithmik #codestorywithmick #codestorywithmikc #codestorywitmik #codestorywthmik #codstorywithmik #codestorywihmik #codestorywithmiik #codeistorywithmik #codestorywithmk #codestorywitmick #codestorymik #codestorwithmik

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
Maximum Score From Removing Substrings | 2 Approaches | With Proof | Leetcode 1717

Поделиться в:

Доступные форматы для скачивания:

Скачать видео

  • Информация по загрузке:

Скачать аудио

Похожие видео

Fancy Sequence | Made Super Simple | Intuitive | Detailed | Leetcode 1622 | codestorywithMIK

Fancy Sequence | Made Super Simple | Intuitive | Detailed | Leetcode 1622 | codestorywithMIK

Robot Collisions | Made Easy | Dry Run | Leetcode 2751 | codestorywithMIK

Robot Collisions | Made Easy | Dry Run | Leetcode 2751 | codestorywithMIK

Stack : Popular Interview Problems

Stack : Popular Interview Problems

Number of Wonderful Substrings  | Clear Intuition | Full Dry Run | Leetcode 1915 | codestorywithMIK

Number of Wonderful Substrings | Clear Intuition | Full Dry Run | Leetcode 1915 | codestorywithMIK

LeetCode 242 – Valid Anagram | Best Interview Approach (HashMap + Sorting) | Java

LeetCode 242 – Valid Anagram | Best Interview Approach (HashMap + Sorting) | Java

Maximum Subsequence Score | Intuition | AMAZON | Leetcode-2542 | Explanation ➕ Live Coding

Maximum Subsequence Score | Intuition | AMAZON | Leetcode-2542 | Explanation ➕ Live Coding

Мне потребовалось 10+ лет, чтобы понять то, что я вам расскажу через 8 минут.

Мне потребовалось 10+ лет, чтобы понять то, что я вам расскажу через 8 минут.

ИИ-ПУЗЫРЬ скоро лопнет? Реальные факты про нейросети от специалиста по кибербезопасности.

ИИ-ПУЗЫРЬ скоро лопнет? Реальные факты про нейросети от специалиста по кибербезопасности.

Кто заказал войну на Ближнем Востоке?

Кто заказал войну на Ближнем Востоке?

Как мгновенно распознавать шаблоны Leetcode (500 проблем спустя)

Как мгновенно распознавать шаблоны Leetcode (500 проблем спустя)

DSA was hard until i learned these 10 Patterns | Master DSA Now

DSA was hard until i learned these 10 Patterns | Master DSA Now

Путин боится интернета и не боится москвичей (English subtitles) @Max_Katz

Путин боится интернета и не боится москвичей (English subtitles) @Max_Katz

LeetCode was HARD until I Learned these 15 Patterns

LeetCode was HARD until I Learned these 15 Patterns

Amount of Time for Binary Tree to Be Infected | Using DFS | One Pass | Leetcode 2385

Amount of Time for Binary Tree to Be Infected | Using DFS | One Pass | Leetcode 2385

10 Important Python Concepts In 20 Minutes

10 Important Python Concepts In 20 Minutes

Sum of Subarray Minimums | Detailed | Leetcode 907

Sum of Subarray Minimums | Detailed | Leetcode 907

132 Pattern | Intuition explained | Brute Force | Better | Optimal  | META | AMAZON | Leetcode - 456

132 Pattern | Intuition explained | Brute Force | Better | Optimal | META | AMAZON | Leetcode - 456

Shortest Palindrome | Multiple Ways | KMP Zindabaad | Leetcode 214 | codestorywithMIK

Shortest Palindrome | Multiple Ways | KMP Zindabaad | Leetcode 214 | codestorywithMIK

Second Minimum Time to Reach Destination | 2 Approaches | FULL DRY RUN | Leetcode 2045

Second Minimum Time to Reach Destination | 2 Approaches | FULL DRY RUN | Leetcode 2045

Сортировка массива нулей, единиц и двоек | Интуиция алгоритмов🔥 | C++ Java Python | Brute-Better-...

Сортировка массива нулей, единиц и двоек | Интуиция алгоритмов🔥 | C++ Java Python | Brute-Better-...

© 2025 ycliper. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]