FastPrepWizard Scroll Allocation Strategy
Problems/Wizard Scroll Allocation Strategy

Wizard Scroll Allocation Strategy

Jane Street logoJane Street● MediumINTERNONSITE INTERVIEW

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in a Jane Street intern onsite interview. The interview report describes ten new scrolls per day, one changing monster per day, and improving a strategy using earlier information. We chose how scrolls last, the costs, and the tie-breaking, so the answer is always the same.

A wizard receives ten scrolls at the start of every day, and unused scrolls persist. On day i, one monster with cost costs[i] appears. The wizard may defeat that monster only on that day by spending its cost.

Return the zero-based days on which the wizard should defeat monsters. Maximize the number defeated, then minimize total scrolls spent, then choose the lexicographically smallest day list.

Function

chooseMonsterDays(costs: int[]) → int[]

Examples

Example 1

costs = [5,25,5]return = [0,2]

Defeating days 0 and 2 costs ten scrolls total and is feasible; no schedule defeats all three monsters.

Example 2

costs = [10,20,30]return = [0]

Only one monster can be defeated. Day 0 has the smallest total spend and therefore wins the tie.

Constraints

  • 1 <= costs.length <= 20.
  • 1 <= costs[i] <= 10^4.
  • A selected schedule is feasible when cumulative spending through every day is at most 10 * (day + 1).

More Jane Street interview questions

  • Code Editor FoldingONSITE INTERVIEW · Seen Oct 2026
  • Exact-Sixty Dice Game ValueONSITE INTERVIEW · Seen Oct 2026
  • Expected Value of Modified DiceONSITE INTERVIEW · Seen Oct 2026
  • Spaceship Equipment LoadoutONSITE INTERVIEW · Seen Oct 2026
  • Two-Tower Strategy GameONSITE INTERVIEW · Seen Oct 2026
  • Sort TradesPHONE SCREEN · ONSITE INTERVIEW · Seen Jul 2026
  • Order Matching EngineONSITE INTERVIEW · Seen Jul 2026
  • Order Book Data ValidationONSITE INTERVIEW · Seen Nov 2025
  • Biggest Daily Move and Longest Rising StreakOA · ONSITE INTERVIEW · Seen Apr 2021
  • Maximum-Scoring Consecutive Tree LevelsPHONE SCREEN · Seen Nov 2026

Similar questions at other companies

  • Largest Number Below N from Reusable DigitsByteDance · PHONE SCREENByteDance interview questions
  • Find GPU Capacity and Drain a NodeTogether AI · PHONE SCREEN
  • Tennis Court SchedulingAtlassian · PHONE SCREEN · ONSITE INTERVIEWAtlassian interview questions
  • Minimum Station Tracks for a Train ScheduleBNSF Railway · ONSITE INTERVIEWBNSF Railway interview questions
  • Best Time to Buy and Sell Stock IIKotak Mahindra Bank · ONSITE INTERVIEWKotak Mahindra Bank interview questions
  • Minimize Total Weight After HalvingAmazon · ONSITE INTERVIEW
  • Capacity to Ship Packages Within DaysMicrosoft · OA · ONSITE INTERVIEWMicrosoft interview questions
  • Unique Single-Use Sum CombinationsLinkedIn · ONSITE INTERVIEWLinkedIn interview questions
  • Gas StationeBay · ONSITE INTERVIEWeBay interview questions
  • Make an Array Non-Decreasing With One ModificationGoogle · ONSITE INTERVIEWGoogle interview questions

Jane Street interview experiences

  • Jane Street TDO UK and Hong Kong: 22 Experiences (Part 10 of 10)
  • Jane Street TDOE US Final Round: 11 Experiences (Part 5 of 10)
  • Jane Street TDO Phone Math Round: 26 Experiences (Part 9 of 10)
  • Jane Street TDOE UK Phone Screen: 15 Experiences (Part 4 of 10)
  • Jane Street TDO Excel and VBA Test: 23 Experiences (Part 8 of 10)
  • Jane Street TDOE UK Coding Round: 15 Experiences (Part 3 of 10)
All Jane Street interview questionsSee Jane Street hiring insights
Saved
class Solution {
    public int[] chooseMonsterDays(int[] costs) {
        // Write your code here.
    }
}
Checking account…