FastPrepWord Search
Problems/Word Search

Word Search

WhatNot logoWhatNot● MediumINTERNPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: An internship report names the Word Search problem. Our version is about 95% the same as the reported question. The grid interface, limits, examples, and explicit movement rules are our assumptions.

Given a rectangular character grid represented by the strings in board and a nonempty word, return true if the word can be formed by following a path through the grid.

  • The path may start at any cell.
  • Each next cell must be immediately above, below, left, or right of the previous cell. Diagonal moves are not allowed.
  • A cell may be used at most once in the same path.
  • The characters along the path must match word in order.

Function

wordSearch(board: String[], word: String) → boolean

Examples

Example 1

board = ["ABCE","SFCS","ADEE"]word = "ABCCED"return = true
board
01230ABCE1SFCS2ADEE

A path starts at the top-left cell, moves right twice, down twice, then left to spell the word.

Example 2

board = ["ABCE","SFCS","ADEE"]word = "SEE"return = true
board
01230ABCE1SFCS2ADEE

Start at the S in the rightmost column, move down to E, then left to E.

Example 3

board = ["ABCE","SFCS","ADEE"]word = "ABCB"return = false
board
01230ABCE1SFCS2ADEE

Spelling the final B would require using the same top-row B cell twice.

Constraints

  • 1 <= board.length <= 10.
  • All rows have the same length c, with 1 <= c <= 10 and board.length * c <= 50.
  • Grid cells and the word contain only uppercase English letters.
  • 1 <= word.length <= 10.

More WhatNot Phone Screen questions

  • Merge Sorted Squares of Two ArraysPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Adjacent Pair and Run RemovalPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • User Journey PathsPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • User Journey Paths from a Log StreamPHONE SCREEN · Seen Nov 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

  • Word SearchBloomberg LP · OA · PHONE SCREEN · ONSITE INTERVIEWBloomberg LP interview questions
  • Word SearchCognitiv · PHONE SCREEN
  • Find a Word in a Letter GridAdobe · PHONE SCREENAdobe interview questions
  • Adjacent-Key Lock PatternsC3.ai · PHONE SCREENC3.ai interview questions
  • Word Search IIApple · PHONE SCREENApple interview questions
  • Word SearchAmazon · ONSITE INTERVIEW
  • Word SearchMicrosoft · ONSITE INTERVIEWMicrosoft interview questions
  • Enumerate Character Paths to a MarkerTesla · ONSITE INTERVIEWTesla interview questions
  • Trace a Word Through a Letter GridExpedia · ONSITE INTERVIEWExpedia interview questions
  • Rat in a Maze: All Simple PathsPeopleStrong · OAPeopleStrong interview questions

Interview reports that mention this question

  • Whatnot interviews · February 2026
  • Whatnot interviews · March 2026 (Part 2 of 2)

WhatNot interview experiences

  • Whatnot SWE New Grad
  • Whatnot OA · 2024
  • Whatnot OA · November 2023
  • Whatnot interviews · November 2023
All WhatNot interview questionsSee WhatNot hiring insights
Saved
class Solution {
    public boolean wordSearch(String[] board, String word) {
        // write your code here
    }
}
Checking account…