FastPrepTeleporter Board: Can You Finish?
Problems/Teleporter Board: Can You Finish?

Teleporter Board: Can You Finish?

WhatNot logoWhatNot● MediumNEW GRADPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in a Whatnot new grad Karat screen as the second part of a board game question. It follows a first part that lists the squares a single turn can reach. The task and all test boards are the same as reported.

The report gives no size limits, so boards here have at most 1000 squares.

Our version is about 95% the same as the reported question.

Given a board game with teleporters, return true if a player starting on square start can reach square lastSquare in some number of turns, and false otherwise.

The board has squares numbered 0 to lastSquare. Each string in teleporters has the form "from,to": a player whose move ends on square from is sent to square to, which may be ahead or behind.

One turn works like this:

  1. Roll a die that shows a number from 1 to dieSides.
  2. Move forward that many squares. If that would pass lastSquare, stop on lastSquare.
  3. If you stop on a square with a teleporter, follow it. At most one teleporter is used per turn, even if the teleporter sends you to another teleporter square.

You may choose any die roll on every turn. Teleporters can send you backward, so some squares may lead only to loops.

Function

finishable(teleporters: String[], dieSides: int, start: int, lastSquare: int) → boolean

Examples

Example 1

teleporters = ["10,8","11,5","12,7","13,9"]dieSides = 4start = 0lastSquare = 20return = false

With a 4-sided die you cannot jump past squares 10 to 13, and each of them sends you back. You never get past square 13.

Example 2

teleporters = ["10,8","11,5","12,7","13,9","2,15"]dieSides = 4start = 0lastSquare = 20return = true

Roll 2 from square 0 to land on 2 and teleport to 15. From there you can walk to 20.

Example 3

teleporters = ["10,8","11,5","12,7","13,9","2,15"]dieSides = 4start = 9lastSquare = 20return = false

From square 9 every path still runs into the teleporters at 10 to 13, and you cannot get back to square 2.

Example 4

teleporters = ["10,8","11,5","12,1","13,9","2,15"]dieSides = 4start = 9lastSquare = 20return = true

Example 5

teleporters = ["2,4","9,8","11,7","12,6","18,14","19,16","20,9","21,14","22,6","23,26","25,10","28,19","29,27","31,29","38,33","39,17","41,30","42,28","45,44","46,36"]dieSides = 4start = 0lastSquare = 50return = false

Example 6

teleporters = ["2,4","9,8","11,7","12,6","18,14","19,16","20,9","21,14","22,6","23,26","25,10","28,19","29,27","31,29","38,33","39,17","41,30","42,28","45,44","46,36"]dieSides = 6start = 0lastSquare = 50return = true

Example 7

teleporters = ["4,21","11,18","13,17","16,17","18,21","22,11","26,25","27,9","31,38","32,43","34,19","35,19","36,39","38,25","41,31"]dieSides = 4start = 0lastSquare = 50return = true

Example 8

teleporters = ["4,21","11,18","13,17","16,17","18,21","22,11","26,25","27,9","31,38","32,43","34,19","35,19","36,39","38,25","41,31"]dieSides = 2start = 0lastSquare = 50return = false

Constraints

  • 1 <= lastSquare <= 1000
  • 1 <= dieSides <= lastSquare
  • 0 <= start < lastSquare
  • 0 <= teleporters.length <= lastSquare
  • Each teleporters[i] is "from,to" with 1 <= from < lastSquare, 0 <= to <= lastSquare and from != to.
  • No two teleporters start on the same square.

More WhatNot Phone Screen questions

  • Adjacent Pair and Run RemovalPHONE SCREEN · Seen Nov 2026
  • Merge Sorted Squares of Two ArraysPHONE SCREEN · Seen Nov 2026
  • User Journey PathsPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Knight Dialer SequencesPHONE SCREEN · Seen Oct 2026
  • Reachable Exits in an Obstacle GridPHONE SCREEN · Seen Oct 2026
  • Palindrome with One DeletionPHONE SCREEN · Seen Oct 2026
  • Search a 2D MatrixPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Attraction Route Without Reusing TrailsPHONE SCREEN · Seen Sep 2026
  • Earliest Car for Each PassengerPHONE SCREEN · Seen Sep 2026
  • Minimum Stores for a Shopping ListPHONE SCREEN · Seen Sep 2026

Similar questions at other companies

  • Shortest Pin Path Through TopicsPinterest · PHONE SCREENPinterest interview questions
  • Word Chain Jumps in a GridGoogle · PHONE SCREENGoogle interview questions
  • Linked Merchants Within Two HopsStripe · PHONE SCREENStripe interview questions
  • Currency Conversion RateAmazon · PHONE SCREEN · ONSITE INTERVIEW
  • Route Graph Reachability with a Broken LinkFigma · PHONE SCREENFigma interview questions
  • Minimum Currency ConversionsEPAM · PHONE SCREENEPAM interview questions
  • Finite Web CrawlerMongoDB · PHONE SCREEN · ONSITE INTERVIEWMongoDB interview questions
  • Currency Conversion RateBloomberg LP · PHONE SCREEN · ONSITE INTERVIEWBloomberg LP interview questions
  • Clone a Connected GraphAbridge · PHONE SCREENAbridge interview questions
  • Rule References: Validity and EligibilityPlaid · PHONE SCREENPlaid interview questions

Interview reports that mention this question

  • Whatnot SWE New Grad Second Technical Interview: 8 Experiences

WhatNot interview experiences

  • Whatnot interviews · October 2026
  • Whatnot Experienced SWE Phone Screen Questions: 2 Experiences
  • Whatnot SWE Interview Questions: 6 Experiences
All WhatNot interview questionsSee WhatNot hiring insights
Saved
class Solution {
    public boolean finishable(String[] teleporters, int dieSides, int start, int lastSquare) {
        
    }
}
Checking account…