Question DSA-TP-0047
MediumWhat is the time complexity of checking whether s is a subsequence of t using two pointers?
- A.
O(|s| × |t|)
- B.
O(2^|s|)
- C.
O(log |t|)
- D.
O(|s| + |t|)
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Two Pointers and Sliding Window question
What is the time complexity of checking whether s is a subsequence of t using two pointers?
O(|s| × |t|)
O(2^|s|)
O(log |t|)
O(|s| + |t|)
Sign up free to see the answer and a step-by-step explanation.