Fading Coder

One Final Commit for the Last Sprint

Efficiently Counting PAT Substrings in a String

Given a string composed exclusively of 'P', 'A', and 'T' characters, determine the total number of contiguous 'PAT' substrings. Each 'PAT' substring consists of a 'P' flolowed by an 'A' followed by a 'T', with characters in sequence but not necessarily adjacent. The result must be modulo 1000000007...