This is a verified interview question from Icpc-algoqueen. Candidates reporting seeing this problem in recent Online Assessments (OAs) and onsite rounds. Mastering "Buggy Tape - ICPC Algoqueen 2026" covers key patterns like Arrays.
"Grace is inspecting a reel of punch tape represented by a string S consisting of English letters. A tape is considered "buggy" if it contains the continuous substring "moth". The letters must appear in that exact order and contiguously, regardless of whether they are uppercase or lowercase. Given the string S, determine if the tape is buggy. Input Format The first line contains an integer T, the number of test cases. Each test case contains a single string S. Output Format For each test case: Print YES if the string contains at least one occurrence of "moth" (case-insensitive). Print NO otherwise. The checker is case-insensitive. Input 3 Moth hello moTHology Output YES NO YES"
Join thousands of developers practicing for Icpc-algoqueen.