DataDriven
LearnPracticeInterviewDiscussDailyJobs

The Sneaky Twins

A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.

Domain
Python
Difficulty
medium
Seniority
L4

Problem

A genomics pipeline scans a long lowercase string `sequence` for every place a short marker could be hiding, even when its bases have been shuffled into a different order. Return the starting index of every window in `sequence`, equal in length to `marker`, that uses exactly the same bases as `marker` with the same counts. Indices come back in increasing order, and a `marker` longer than `sequence` yields nothing.

Summary

They look different but they are the same inside.

Practice This Problem

Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.

Related

  • All Practice Problems
  • Mock Interview Mode
  • Python Interview Questions
  • Data Engineering Interview Prep Guide
  • Daily Challenge
  • Data Engineering Lessons