Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Find Missing Rotating Object

EasyPython00:00
Practice interviewer
In session
5 left
00:00

Your question is Find Missing Rotating Object. Start with the requirements on the right.

Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.

You need to log in / sign up to run or submit.

Problem

Given a sequence of cube states represented as lists of three visible face labels [front, right, top], exactly one state is missing. Each next state is produced by rotating the same cube by a fixed operation. Return the missing state as a list of three labels.

Constraints

  • 3 <= len(states) <= 10^4
  • Each known state is either null or a list of exactly 3 integers
  • Face labels are distinct integers from 1 to 6
  • Exactly one state is missing
  • The sequence follows repeated applications of one fixed cube rotation

Function Signature

def find_missing_rotation(states):
Your solutionPython 3
You need to log in / sign up to run or submit.
Run your code to see test output