Maximize Xbox Achievement Points Without Playing Consecutive Days

Last updated: November 29, 2026

Quick Overview

Each day of an Xbox event offers a known number of achievement points, but a player who plays on one day is locked out the next day. Return the maximum total points the player can earn.

Microsoft
Coding & Algorithms
Software Engineer
Microsoft
November 29, 2026
Software Engineer
Phone Screen
Coding & Algorithms
Easy

0

0

0 solved


Each day of an Xbox event offers a known number of achievement points, but a player who plays on one day is locked out the next day. Return the maximum total points the player can earn.

A warm-up in Microsoft phone screens that checks whether a candidate can move from a recursive choice (play or skip today) to a constant-space DP. Interviewers watch for a clean state definition before any code, and often extend it to a circular or multi-day lockout to see whether the state design generalizes.

What the Interviewer Expects
  • Define the state as best total up to day i with or without playing day i
  • Write the recurrence before coding
  • Reduce O(n) memory to O(1) with two rolling variables
  • Handle empty and single-day inputs
  • Trace a short example aloud
Key Topics to Cover
1D dynamic programming
state compression
take or skip recurrence
Xbox scenario
How to Approach This
  1. Clarify input constraints and edge cases before writing code.
  2. Walk through your approach verbally and confirm with the interviewer before coding.
  3. Start with a brute force solution, then optimize. Mention time and space complexity.
  4. Test your solution with examples, including edge cases like empty input or duplicates.
  5. Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
  • What if the lockout lasts two days instead of one?
  • How would you return which days to play, not just the total?
  • What changes if the event days form a circle, so the first and last day are adjacent?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice DSA Problems
Sample Answer
Requirements
  • Input: list of non-negative integers points, one per day.
  • Cannot take two adjacent indices.
  • Output: maximum sum. Empty list gives 0....
High-Level Design

This is a take-or-skip DP. Let take be the best total if the previous day was played and skip the best if it was not. For each new day, playing it is only allowed after a skip: `new_take = skip + ...


Submit Your Answer
Markdown supported