Leetcode Solutions 5781. Remove All Occurrences of a Substring

  Рет қаралды 14,443

Fraz

Fraz

Күн бұрын

Пікірлер: 42
@SaurabhJeena-sh4gh
@SaurabhJeena-sh4gh 2 ай бұрын
class Solution { public String removeOccurrences(String s, String part) { StringBuilder str=new StringBuilder(); for(int i=0;i=0&&str.substring(j).equals(part)){ str.setLength(j); } } return str.toString(); } } runs in 5 ms time done by myself had a great boost in confidence ..code is small but it took me 6 hours to come up to this solution
@navneetkumarkushwaha5689
@navneetkumarkushwaha5689 10 ай бұрын
Good Approach. Sir
@shubhamhire9390
@shubhamhire9390 2 жыл бұрын
The explanation was amazing 🔥🔥🔥
@shresthjain7557
@shresthjain7557 Жыл бұрын
such an easy explanation!!!
@nitin5865
@nitin5865 3 жыл бұрын
Thanks a ton bhaiya, I haven't thought of stack here 🤦
@mohammadfraz
@mohammadfraz 3 жыл бұрын
It's easy to implement
@rishitiwari6200
@rishitiwari6200 3 жыл бұрын
Bhaiya ek bhi nhi hua tried 30 minutes a and 1 hour B no results b me toh runtime hi aate reh gya bhttc me using s.erase aur A me wa feeling very demotivated hope to do 1-2 tomorrow in weekly
@mohammadfraz
@mohammadfraz 3 жыл бұрын
All the best for tomorrow, you will do better
@yatharthbajaj3978
@yatharthbajaj3978 3 жыл бұрын
Day 19:3quesrions Total:105
@mohammadfraz
@mohammadfraz 3 жыл бұрын
Good job Yatharth
@yourbestie4138
@yourbestie4138 3 жыл бұрын
It was very helpful sir!!,I was able to solve 3 questions during yesterdays contest so am i somewhat at good level sir? Suggest me some ideas so that i can consistently solve 3-4 questions on leetcode contests
@mohammadfraz
@mohammadfraz 3 жыл бұрын
You are doing good. Keep practicing
@agree.
@agree. 3 жыл бұрын
Was waiting for it
@mohammadfraz
@mohammadfraz 3 жыл бұрын
Thanks 😊
@rajgupta5158
@rajgupta5158 3 жыл бұрын
3rd question is based on dp in which I not so good, Sir can you provide some tips to me to do at least 3 questions because I got a stack to solve only 2 problems in each contest except very few contest this thing very demotivated for me.
@mohammadfraz
@mohammadfraz 3 жыл бұрын
I told everything in video bro , I provided resources also
@sahilbhaiya6200
@sahilbhaiya6200 3 жыл бұрын
Helpful video 👍
@mohammadfraz
@mohammadfraz 3 жыл бұрын
Thanks
@sahilbhaiya6200
@sahilbhaiya6200 3 жыл бұрын
@@mohammadfraz it's my pleasure 👍
@abhishekvishwakarma9045
@abhishekvishwakarma9045 3 жыл бұрын
Have you done Competitive programing just want some reviews on that
@mohammadfraz
@mohammadfraz 3 жыл бұрын
Yes I have
@Code_Note
@Code_Note 3 жыл бұрын
Bhaiya I had this question in mind why doesn't leetcode gives the access to see the submissions of others because many a times we write buggy codes which somehow sometimes passes test cases (generally weak test cases).So if we can access the submissions of top in ranklist then we can debug our code as well and stress testing to find such cases.
@mohammadfraz
@mohammadfraz 3 жыл бұрын
No they don't allow access to other's cases
@mohdtabish_1
@mohdtabish_1 Жыл бұрын
string removeOccurrences(string s, string part) { while(s.find(part)!=-1){ s.erase(s.find(part),part.size()); } return s; }
@shanumishra4930
@shanumishra4930 3 жыл бұрын
Day 19: 3 ques..including this ques Total: 183
@mohammadfraz
@mohammadfraz 3 жыл бұрын
That's nice
@ayushthakur2896
@ayushthakur2896 3 жыл бұрын
can we reduce the TC by using KMP?
@abhaytiwari6411
@abhaytiwari6411 3 жыл бұрын
4th questions of biweekly 55 is hard please solve it
@gautamarora6556
@gautamarora6556 3 жыл бұрын
Day 19: 3 ques Total: 239
@mohammadfraz
@mohammadfraz 3 жыл бұрын
Amazing 🔥
@rishabhdevbanshi9780
@rishabhdevbanshi9780 3 жыл бұрын
Day 19 : solved 3 ques on Leetcode and 2 ques on GFG
@mohammadfraz
@mohammadfraz 3 жыл бұрын
Nice 🔥
@mohammedwaseem8599
@mohammedwaseem8599 3 жыл бұрын
Bro what is mean by OA??
@mohammadfraz
@mohammadfraz 3 жыл бұрын
Online test
@shivam_dhyani
@shivam_dhyani 3 жыл бұрын
Bhaiya this problem number is 1910!! Please check it once!
@mohammadfraz
@mohammadfraz 3 жыл бұрын
This is the numbering during contest. I will update it
@shivam_dhyani
@shivam_dhyani 3 жыл бұрын
@@mohammadfraz yes bhaiya it was, but now they have changed. Thank you for replying, you are doing a great work for CS Community. 🙏 Just one suggestion, is that, please make the video solution more comprehensive, so that beginners can also take advantage of your videos. ☺
@04_itsanskaragarwal73
@04_itsanskaragarwal73 Жыл бұрын
Incomplete coding explanation try to complete the entire things
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 61 МЛН
It’s all not real
00:15
V.A. show / Магика
Рет қаралды 20 МЛН
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 18 МЛН
Making an Algorithm Faster
30:08
NeetCodeIO
Рет қаралды 187 М.
How I Mastered Data Structures and Algorithms in 8 Weeks
15:46
Aman Manazir
Рет қаралды 145 М.
Winning Google Kickstart Round A 2020 + Facecam
17:10
William Lin (tmwilliamlin168)
Рет қаралды 10 МЛН
How to Solve ANY LeetCode Problem (Step-by-Step)
12:37
Codebagel
Рет қаралды 333 М.
2 Years Of Learning C | Prime Reacts
22:24
ThePrimeTime
Рет қаралды 325 М.
Maximum Score From Removing Substrings - Leetcode 1717 - Python
22:25
I gave 127 interviews. Top 5 Algorithms they asked me.
8:36
Sahil & Sarra
Рет қаралды 683 М.