PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Coding & Algorithms/Jane Street

Implement Connect Four with bottom push-up

Last updated: Apr 19, 2026

Quick Overview

This question evaluates proficiency in data structures, algorithm design, state management, and API design for game mechanics, focusing on board representation, move operations, win detection, and undo/redo functionality.

  • Medium
  • Jane Street
  • Coding & Algorithms
  • Software Engineer

Implement Connect Four with bottom push-up

Company: Jane Street

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Take-home Project

Implement a Connect Four variant where when a player inserts a disc into a column, the disc moves to the bottom cell of that column and pushes all existing discs in that column up by one. If the column is already full, the disc that is pushed above the top row is ejected and removed from the board. Design the board representation and APIs to: ( 1) initialize with R rows and C columns (default 6x 7), ( 2) drop a disc for a given player into a column, ( 3) detect a win (four in a row horizontally, vertically, or diagonally) after each move, and ( 4) support undo and redo of moves. Specify time and space complexities, data structures used, and how you handle edge cases such as ejected discs, invalid columns, alternating turns, and draw detection. Provide code for the core operations.

Quick Answer: This question evaluates proficiency in data structures, algorithm design, state management, and API design for game mechanics, focusing on board representation, move operations, win detection, and undo/redo functionality.

Related Interview Questions

  • Optimize trade PnL table updates - Jane Street (hard)
  • Transform sparse time-code stream to dense rows - Jane Street (easy)
  • Sort trade executions into a canonical order - Jane Street (easy)
  • Solve queue switch and coin change puzzles - Jane Street (medium)
Jane Street logo
Jane Street
Sep 6, 2025, 12:00 AM
Software Engineer
Take-home Project
Coding & Algorithms
38
0

Implement a Connect Four variant where when a player inserts a disc into a column, the disc moves to the bottom cell of that column and pushes all existing discs in that column up by one. If the column is already full, the disc that is pushed above the top row is ejected and removed from the board. Design the board representation and APIs to: (

  1. initialize with R rows and C columns (default 6x 7), (
  2. drop a disc for a given player into a column, (
  3. detect a win (four in a row horizontally, vertically, or diagonally) after each move, and (
  4. support undo and redo of moves. Specify time and space complexities, data structures used, and how you handle edge cases such as ejected discs, invalid columns, alternating turns, and draw detection. Provide code for the core operations.

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Jane Street•More Software Engineer•Jane Street Software Engineer•Jane Street Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 7,500+ 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
  • Compare Platforms
  • Discord Community

Support

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

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.