PracHub
QuestionsCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Apple

Refactor rock–paper–scissors for config and ties

Last updated: Mar 29, 2026

Quick Overview

This question evaluates a candidate's proficiency in object-oriented design, configuration injection, extensibility, state tracking (including ties), and testability when refactoring a Rock–Paper–Scissors tournament to support configurable rounds.

  • medium
  • Apple
  • Coding & Algorithms
  • Software Engineer

Refactor rock–paper–scissors for config and ties

Company: Apple

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Onsite

Refactor an existing Rock–Paper–Scissors tournament with three robot players so that the number of rounds is configurable and the system also tracks ties. Describe the class/interface changes (e.g., Game, Match, Player, Strategy, Scoreboard, Config), how configuration is injected, how results are reported (per-player wins and total ties), and how you would make the design extensible for new strategies or gestures and testable.

Quick Answer: This question evaluates a candidate's proficiency in object-oriented design, configuration injection, extensibility, state tracking (including ties), and testability when refactoring a Rock–Paper–Scissors tournament to support configurable rounds.

Related Interview Questions

  • Solve Subset Sum And Return All Matching Subsets - Apple (medium)
  • Minimal Unique Word Abbreviations - Apple (medium)
  • Convert a Roman Numeral to an Integer - Apple (medium)
  • Vertical Order Traversal of a Binary Tree - Apple (medium)
  • Implement a FIFO Queue Using Two Stacks - Apple (medium)
|Home/Coding & Algorithms/Apple

Refactor rock–paper–scissors for config and ties

Apple logo
Apple
Sep 6, 2025, 12:00 AM
mediumSoftware EngineerOnsiteCoding & Algorithms
6
0

Refactor an existing Rock–Paper–Scissors tournament with three robot players so that the number of rounds is configurable and the system also tracks ties. Describe the class/interface changes (e.g., Game, Match, Player, Strategy, Scoreboard, Config), how configuration is injected, how results are reported (per-player wins and total ties), and how you would make the design extensible for new strategies or gestures and testable.

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Apple•More Software Engineer•Apple Software Engineer•Apple Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 8,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
  • 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.