Leetcode 392. Is Subsequence | Leetcode Daily Challenge | Is String s a subsequence of string t
HTML-код
- Опубликовано: 6 янв 2025
- 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...
Essy efficient and clean cut clear solution thanks++
The Legend , The God , The Real OG what a content
Thank you so much sister...this was very helpful
Acha btate ho mam ap... Nyc video
Your solutions are very precise. Thanks
Can u pls discuss the Follow UP question?
Follow up: Suppose there are lots of incoming s, say s1, s2, ..., sk where k >= 109, and you want to check one by one to see if t has its subsequence. In this scenario, how would you change your code?
Thank you, you are amazing!
Keep posting ✨
Thanks maam for making this solution simple
Thank you
Loved the explanation ✨
Love you mam🌹
Tq di nice explain
keep going i love your videos
good explanation mam tqu
Which Software you use for drawing on screen? Please Reply
pls explain the space and time complexity for this
Thanks, Please upload GFG Problem of the day
is Time Complexity=O(1) ?
plss reply
thnx though, nice explanation
Nope
👌👌
Mam please upload also gfg day to day problem
Hi I got the question i Tried to solve it in java
Please help i m unable to get it accepted
class Solution {
public boolean isSubsequence(String s, String t) {
if(s=="")
return true;
if(s.length()>t.length())
return false;
int i=0;
int j=0;
while(i
Please solve this problem Exactly one swap(gfg problem of the day)
This brute-force approach is not working
#include
using namespace std;
string swap(string s, int i, int j)
{
swap(s[i], s[j]);
return s;
}
int main()
{
string s = "ab";
map mp;
char cstr[s.size() + 1];
strcpy(cstr, s.c_str()); // or, pass `&s[0]`
for (int i = 0; i < s.size() - 1; i++)
{
for (int j = i + 1; j < s.size(); j++)
{
string p = swap(s, i, j);
mp[p]++;
}
}
cout