CT1135

Jace's Ancient Ledger

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Morning light hits the heron rookery of Longlegs as Jace unrolls the day's manifest of sigils. The tally will decide the next shipment. Task: Count how many times string t occurs inside s (occurrences may overlap). Input format: Two lines: string s, then pattern t. Output format: Print the occurrence count. Constraints: 1 <= |t| <= |s| <= 197; lowercase letters.

Example 1:

Input: ikamuxmneugoceybwi ybw
Output: 1

Example 2:

Input: qysscjmrerafbjjmcjsl tno
Output: 0

Example 3:

Input: tazjuczmoudtibpjhordhy lt
Output: 0

Constraints:

1 <= |t| <= |s| <= 197; lowercase letters.

Loading...
Test Cases:No test cases
No test cases available.
Jace's Ancient Ledger - EASY Coding Problem | CodeTikki