filmov
tv
Minimum Length of String After Deleting Similar Ends | Simple Two Pointers | Leetcode 1750

Показать описание
This is the 7th Video of our Playlist "Two Pointers : Popular Interview Problems".
In this video we will try to solve a good problem : Minimum Length of String After Deleting Similar Ends | Leetcode 1750
Share your learnings on LinkedIn, Twitter (X), Instagram, Facebook(Meta) with #codestorywithmik & feel free to tag me.
I will explain the intuition so easily that you will never forget and start seeing this as cakewalk EASYYY.
We will do live coding after explanation and see if we are able to pass all the test cases.
Also, please note that my Github solution link below contains both C++ as well as JAVA code.
Problem Name : Minimum Length of String After Deleting Similar Ends | Leetcode 1750
Company Tags : AMAZON
Approach Summary :
The provided approach defines a class named `Solution` with a method `minimumLength`, which calculates and returns the minimum length of a string `s` after repeatedly removing identical characters from both ends. The algorithm uses two pointers (`i` and `j`) starting from the beginning and end of the string and iterates until these pointers meet or the characters at their positions are different. It then removes consecutive identical characters from both ends, updating the pointers accordingly. The final result is the length of the remaining substring after these removals. The `main` method demonstrates how to use this solution by providing an example input string.
╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
╠╗║╚╝║║╠╗║╚╣║║║║║═╣
╚═╩══╩═╩═╩═╩╝╚╩═╩═╝
✨ Timelines✨
00:00 - Introduction
04:39 - 2 Pointers
06:46 - Dry Run
10:27 - Corner Case
14:54 - Live coding
#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 #leetcodesolutions #leetcodequestionandanswers #code #learning #dsalgo #dsa #2024 #newyearZ
In this video we will try to solve a good problem : Minimum Length of String After Deleting Similar Ends | Leetcode 1750
Share your learnings on LinkedIn, Twitter (X), Instagram, Facebook(Meta) with #codestorywithmik & feel free to tag me.
I will explain the intuition so easily that you will never forget and start seeing this as cakewalk EASYYY.
We will do live coding after explanation and see if we are able to pass all the test cases.
Also, please note that my Github solution link below contains both C++ as well as JAVA code.
Problem Name : Minimum Length of String After Deleting Similar Ends | Leetcode 1750
Company Tags : AMAZON
Approach Summary :
The provided approach defines a class named `Solution` with a method `minimumLength`, which calculates and returns the minimum length of a string `s` after repeatedly removing identical characters from both ends. The algorithm uses two pointers (`i` and `j`) starting from the beginning and end of the string and iterates until these pointers meet or the characters at their positions are different. It then removes consecutive identical characters from both ends, updating the pointers accordingly. The final result is the length of the remaining substring after these removals. The `main` method demonstrates how to use this solution by providing an example input string.
╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
╠╗║╚╝║║╠╗║╚╣║║║║║═╣
╚═╩══╩═╩═╩═╩╝╚╩═╩═╝
✨ Timelines✨
00:00 - Introduction
04:39 - 2 Pointers
06:46 - Dry Run
10:27 - Corner Case
14:54 - Live coding
#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 #leetcodesolutions #leetcodequestionandanswers #code #learning #dsalgo #dsa #2024 #newyearZ
Комментарии