Leetcode 2390. Removing Stars From a String | Weekly Contest 308.
Vložit
- čas přidán 27. 08. 2022
- Use coupon ALISHA on any GeeksforGeeks course to get 10% discount:
practice.geeksforgeeks.org/co...
Connect with me on LinkedIn : / alisha-parveen-80579850
Check out our other playlists:
Dynamic Programming:
• Dynamic Programming
Trees:
• Trees
Heaps and Maps:
• Heaps and Maps
Arrays and Maths:
• Arrays and Maths
Bit Manipulation:
• Bit Manipulation
Greedy Algorithms:
• Greedy Algorithms
Sorting and Searching:
• Sorting and Searching
Strings:
• Strings
Linked Lists:
• Linked Lists
Stack and Queues:
• Stacks and Queues
Two Pointers:
• Two pointers
Graphs, BFS, DFS:
• Graphs, DFS, BFS
Backtracking:
• Backtracking
Non- DSA playlists:
Probability:
• Probability
SQL-Basic Join functions:
• SQL - Basic JOIN Funct...
SQL-Basic Aggregate functions:
• SQL-Basic Aggregate Fu...
int j=0;
for(int i=0;i
Thankyou for the solution !!
Thanks a ton Alisha.. Both the solutions were great :)
I can't even think of a solution using two pointer in contest. thanks for the video mam.
Thank U mam
very helpful, keep it up 👍👍
Best explanation . Thanks 👍
You are amazing as usual.
This approach >>>>>>>>>>>>>>>>>>>> my approach using loops somethng somethng
very well explained
Hey can share if you are using tabet and pencil for drawing or alternate device only with touch functionality which is synced to computer ?
Using touch screen laptop
can anyone help why this sol is giving tle as when i dry runned ,it working fine
for(int i=0;i0){
s.erase(i-1,2);//star and its prev char would be erased
i--;
}
}
else i++;
}
return s;
Stacks might help
Very nice ❤️❤️❤️❤️
Python solution
def removeStar(str1):
lst = list(str1)
final = ''
print(lst)
i = 0
for i in range(len(str1)):
if str1[i] == '*':
final=final[0:-1]
continue
else:
final += str1[i]
return final
One of the possible solution in python
you taken I=0,j=0,I don't understand
well explained