[LeetCode/Python] 68. Text Justification

도니·2025년 9월 28일

Interview-Prep

목록 보기
20/29
post-thumbnail

📌 Problem

[LeetCode] 68. Text Justification

📌 Solution

class Solution:
    def isSubsequence(self, s: str, t: str) -> bool:
        i, j = 0, 0
        while i < len(s) and j < len(t):
            if s[i] == t[j]:
                i += 1
            j += 1
        return i == len(s)
profile
Where there's a will, there's a way

0개의 댓글