PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Qualcomm

Implement A* Maze Search

Last updated: Apr 6, 2026

Quick Overview

This question evaluates proficiency in informed search algorithms, heuristic design (admissibility), grid-based graph traversal, path reconstruction, and time/space complexity analysis.

  • medium
  • Qualcomm
  • Coding & Algorithms
  • Software Engineer

Implement A* Maze Search

Company: Qualcomm

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Technical Screen

Implement maze pathfinding in C++. You are given an `m x n` grid where `'.'` is an open cell, `'#'` is a wall, `S` is the start, and `T` is the target. You may move up, down, left, or right, and each move has cost `1`. Use the A* algorithm to find a shortest path from `S` to `T`. Return the minimum distance and one valid shortest path as a list of coordinates. If no path exists, report failure. Your solution should: - use an admissible heuristic, - maintain the data needed to reconstruct the path, - avoid revisiting states unnecessarily, - and analyze time and space complexity.

Quick Answer: This question evaluates proficiency in informed search algorithms, heuristic design (admissibility), grid-based graph traversal, path reconstruction, and time/space complexity analysis.

Qualcomm logo
Qualcomm
Mar 2, 2026, 12:00 AM
Software Engineer
Technical Screen
Coding & Algorithms
1
0

Implement maze pathfinding in C++. You are given an m x n grid where '.' is an open cell, '#' is a wall, S is the start, and T is the target. You may move up, down, left, or right, and each move has cost 1.

Use the A* algorithm to find a shortest path from S to T. Return the minimum distance and one valid shortest path as a list of coordinates. If no path exists, report failure.

Your solution should:

  • use an admissible heuristic,
  • maintain the data needed to reconstruct the path,
  • avoid revisiting states unnecessarily,
  • and analyze time and space complexity.

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

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

Master your tech interviews with 8,000+ 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.