Categorygithub.com/szhou12/leetcode-goleetcode0792-Number-of-Matching-Subsequences
package
0.0.0-20241220224003-b7cf03a90b2b
Repository: https://github.com/szhou12/leetcode-go.git
Documentation: pkg.go.dev

# README

792. Number of Matching Subsequences

Solution ideas

Brute Force

Loop + Greedy Algorithm of 392. Is Subsequence

Binary Search - Optimal Solution

Loop + Binary Search of 392. Is Subsequence

Time complexity = $O(\sum_{k=1}^m W_k\log n)$ where $W_k=$ length of $k$-th word in words, and $n=$ length of target string s

Resource

二分查找高效判定子序列