Question bank › Two Pointers
Dsa Two Pointers Warm-up

Secret Transmission

A spy is checking if a 'shortcode' is hidden within a larger transmission. A shortcode is hidden if all its characters appear in the transmission in the same relative order (though they don't have to be adjacent). Input Format: Two lines. The first line is the shortcode, and the second line is the full transmission string. Output Format: Print 'YES' if the shortcode is a subsequence of the transmission, otherwise print 'NO'. Example: Input: ace abcde Output: YES

Key concepts

two_pointersstring_processing

Practise this out loud — free

Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.

🎙 Practise this question now
Part of InterviewLab's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.