Find Every Rearranged Copy of a Pattern
Asked at Snowflake · Coding Questions · Difficulty: Medium · Last asked Feb 21, 2026
Given a long text and a short pattern, find every place in the text where some rearrangement of the pattern's letters appears as a contiguous block. A block matches when it has exactly the same letters as the pattern with the same counts, in any order.
Loading the problem…
More Snowflake interview questions
- Design a Distributed Job Scheduler with Cron, Pause, Resume
- Design an ACL Authorization Service
- Design an S3-Style Blob Store with Deduplication
- SQL: Project Duration & Budget per Employee
- Cross-Platform Client Logging Library
- Design a Quota System