Karat logoKarat
CodingMembers

Carrying Colored Spheres to the Nearest Matching Holes

Members only

A string-based coding problem about moving colored spheres into matching holes along a single row while keeping the carrying distance small. It tests whether you can spot how the pieces decouple and then speed up the lookup beyond a naive scan.

SWE
medium
string
array
greedy
binary-search
hashmap
python
Frequency
Single report
Last asked
—
Stage
phone-screen

Members get

  • Full problem statement
  • 3 progressive hints
  • Step-by-step approach
  • Full solution with code
  • 6 talking points
  • 4 follow-up questions with answer directions
  • Preparation drills

Log in to continue reading the full content

Comments

Sign in to join the discussion
Loading...