PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Coding & Algorithms/Glean

Search Words in a Character Grid

Last updated: May 5, 2026

Quick Overview

This question evaluates algorithmic problem-solving in grid traversal and multi-word string search, targeting competencies in pathfinding, string matching, efficient use of data structures for shared prefixes, and time/space complexity analysis within the Coding & Algorithms domain.

  • hard
  • Glean
  • Coding & Algorithms
  • Software Engineer

Search Words in a Character Grid

Company: Glean

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: hard

Interview Round: Technical Screen

You are given a 2D grid of lowercase English letters. Part 1: Given a single target word, determine whether the word can be formed by a path in the grid. A path may start from any cell, and each next character must be in a horizontally or vertically adjacent cell. The same grid cell cannot be used more than once in the same path. Part 2: As a follow-up, you are given a list of target words. Return all words from the list that can be formed in the grid under the same adjacency and no-reuse rules. Design the solution to be efficient when the word list is large and many words share prefixes. Implement the required function or functions, describe the expected time and space complexity, and handle edge cases such as empty grids, empty word lists, duplicate words, and words longer than the number of cells.

Quick Answer: This question evaluates algorithmic problem-solving in grid traversal and multi-word string search, targeting competencies in pathfinding, string matching, efficient use of data structures for shared prefixes, and time/space complexity analysis within the Coding & Algorithms domain.

Related Interview Questions

  • Find the Kth Largest in Two Sorted Arrays - Glean (medium)
  • Implement 2048 Game Logic - Glean (medium)
  • Implement 2048 tilt move - Glean (hard)
  • Simulate document assignment to indexers - Glean (hard)
  • Determine Reachability in Train Schedule - Glean (medium)
Glean logo
Glean
Apr 15, 2026, 12:00 AM
Software Engineer
Technical Screen
Coding & Algorithms
2
0

You are given a 2D grid of lowercase English letters.

Part 1: Given a single target word, determine whether the word can be formed by a path in the grid. A path may start from any cell, and each next character must be in a horizontally or vertically adjacent cell. The same grid cell cannot be used more than once in the same path.

Part 2: As a follow-up, you are given a list of target words. Return all words from the list that can be formed in the grid under the same adjacency and no-reuse rules. Design the solution to be efficient when the word list is large and many words share prefixes.

Implement the required function or functions, describe the expected time and space complexity, and handle edge cases such as empty grids, empty word lists, duplicate words, and words longer than the number of cells.

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Glean•More Software Engineer•Glean Software Engineer•Glean Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.