PracHub
QuestionsCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Optiver

Optimize switching puzzle solution

Last updated: Mar 29, 2026

Quick Overview

This question evaluates the ability to model a Lights Out-style grid puzzle as a linear system over GF(2), linear algebra skills (Gaussian elimination and null-space reasoning), and combinatorial optimization for minimizing toggle moves.

  • Medium
  • Optiver
  • Coding & Algorithms
  • Data Scientist

Optimize switching puzzle solution

Company: Optiver

Role: Data Scientist

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Take-home Project

Consider a switching puzzle on an m×n grid of lights where toggling a cell flips its state and that of its orthogonal neighbors (Lights Out variant). Given an initial configuration and a target configuration, compute a sequence of toggles with the minimum number of moves or report that no solution exists. Explain how to model this as a linear system over GF ( 2), choose a variable ordering, perform Gaussian elimination with back-substitution to get one or all solutions, and handle multiple-solution minimization (e.g., via basis enumeration or BFS on the null space). Analyze time complexity and memory trade-offs for m,n ≤ 10.

Quick Answer: This question evaluates the ability to model a Lights Out-style grid puzzle as a linear system over GF(2), linear algebra skills (Gaussian elimination and null-space reasoning), and combinatorial optimization for minimizing toggle moves.

Related Interview Questions

  • Find missing numbers in sequences - Optiver (hard)
  • Design a circular queue data structure - Optiver (medium)
  • Optimize flight and cargo bookings for profit - Optiver (hard)
  • Match alphanumeric patterns in a stream - Optiver (Medium)
  • Design a balloon stability tracker - Optiver (Medium)
|Home/Coding & Algorithms/Optiver

Optimize switching puzzle solution

Optiver logo
Optiver
Sep 6, 2025, 12:00 AM
MediumData ScientistTake-home ProjectCoding & Algorithms
7
0

Consider a switching puzzle on an m×n grid of lights where toggling a cell flips its state and that of its orthogonal neighbors (Lights Out variant). Given an initial configuration and a target configuration, compute a sequence of toggles with the minimum number of moves or report that no solution exists. Explain how to model this as a linear system over GF ( 2), choose a variable ordering, perform Gaussian elimination with back-substitution to get one or all solutions, and handle multiple-solution minimization (e.g., via basis enumeration or BFS on the null space). Analyze time complexity and memory trade-offs for m,n ≤ 10.

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Optiver•More Data Scientist•Optiver Data Scientist•Optiver Coding & Algorithms•Data Scientist Coding & Algorithms
PracHub

Master your tech interviews with 8,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.