FastPrepRepeated-Roll Teleporter Reachability
Problems/Repeated-Roll Teleporter Reachability

Repeated-Roll Teleporter Reachability

Splunk logoSplunk● MediumFULLTIMEPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in a Splunk phone screen. The report does not say how the board edge works, how teleporters chain, what happens when you start at the end, or the number limits. Our version is about 84% the same as the reported question.

A board contains integer squares from 1 through end. Starting at start, you may roll a die with faces 1 through sides any number of times.

After each roll, discard a move whose initial landing exceeds end. Otherwise, if the landing square is a teleporter source, move once to its destination without chaining. Return whether square end is reachable. A player already on end has reached it.

Function

canReachEnd(start: int, end: int, sides: int, teleporters: int[][]) → boolean

Examples

Example 1

start = 1end = 8sides = 2teleporters = [[2,6]]return = true

Roll 1 to reach 2, teleport to 6, then roll 2 to reach 8.

Example 2

start = 1end = 6sides = 1teleporters = [[2,1]]return = false

Every roll lands on 2 and returns to 1, so 6 is unreachable.

Constraints

  • 1 <= start <= end <= 10^5.
  • 1 <= sides <= 100.
  • Teleporter sources are unique, and every endpoint is in [1, end].

More Splunk Phone Screen questions

  • Completely Passable Grid LinesPHONE SCREEN · Seen Aug 2025
  • Nearest Reachable Grid CornerPHONE SCREEN · Seen Aug 2025
  • One-Roll Teleporter LandingsPHONE SCREEN · Seen Aug 2025

Similar questions at other companies

  • Retryable URL MazeRamp · PHONE SCREENRamp interview questions
  • Xiangqi Horse ReachabilityeBay · PHONE SCREENeBay interview questions
  • Generate a Connected Graph and Find a Shortest PathThe Walt Disney Company · PHONE SCREENThe Walt Disney Company interview questions
  • Shortest Path Around Moving ParadesZip · PHONE SCREENZip interview questions
  • Concurrent Web Crawler SimulationOpenAI · PHONE SCREEN · ONSITE INTERVIEWOpenAI interview questions
  • Explore an Unknown Grid and Find a PathLinkedIn · ONSITE INTERVIEWLinkedIn interview questions
  • Minimize Malware Spread by Removing a NodeVisa · OAVisa interview questions
  • Minimize Malware Spread by Removing a NodeAkuna Capital · OAAkuna Capital interview questions
  • Reaching Points with Perfect-Square ObstaclesIMC Trading · OAIMC Trading interview questions
  • Satellite Network Message PropagationOptiver · OAOptiver interview questions
All Splunk interview questionsSee Splunk hiring insights
Saved
class Solution {
    public boolean canReachEnd(int start, int end, int sides, int[][] teleporters) {
        // Return whether end is reachable.
    }
}
Checking account…