3

PROBLEM OF THE DAY : 22/02/2024 | Distinct occurrences

 6 months ago
source link: https://www.geeksforgeeks.org/videos/problem-of-the-day-22022024-distinct-occurrences/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

PROBLEM OF THE DAY : 22/02/2024

February 23, 2024 |340 Views
PROBLEM OF THE DAY : 22/02/2024 | Distinct occurrences
Problem of the Day, bit-magic, Data Structure and Algorithm
 Save  Share  1 Like
Description
Discussion

Welcome to the daily solving of our PROBLEM OF THE DAY with Yash Dwivedi. We will discuss the entire problem step-by-step and work towards developing an optimized solution. This will not only help you brush up on your concepts of Strings but also build up problem-solving skills.

In this problem, we are given two strings s and t of length n and m respectively. Find the count of distinct occurrences of t in s as a sub-sequence modulo 109 + 7.

Example :

Input:
s = "banana" , t = "ban"
Output: 
3
Explanation: 
There are 3 sub-sequences:[ban], [ba n], [b an].

Give the problem a try before going through the video. All the best!!!
Problem Link: https://www.geeksforgeeks.org/problems/distinct-occurrences/1
Solution IDE Link: https://ide.geeksforgeeks.org/online-cpp14-compiler/9e9c7fbb-7553-44ed-b05d-a9bd2afbb6cf

Read More

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK