Typescript-Algorithms
    Preparing search index...

    Variable length_of_last_wordConst

    length_of_last_word: (s: string) => number = lengthOfLastWord

    双指针,反向遍历就好了

    Type declaration

      • (s: string): number
      • Parameters

        • s: string

        Returns number