Skip to content

精选leetcode300题,双指针专栏第一题(力扣925)——“长按键入” #167

Description

@Obito-x

博主原代码现在ac不了,我认为应该加上如下判断条件:1、当字符不匹配时,检查当前typed[j]是否与前一个字符相同(即长按),如果是,继续递增j;否则返回false。2、最后i遍历完name的所有元素,并且如果j没有遍历完typed的所有元素的话,那么typed剩余的元素都应该是name最后一个元素的长按。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions