PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches
|Home/Coding & Algorithms/Meta

Solve grid path and top‑k frequency

Last updated: Mar 29, 2026

Quick Overview

This question evaluates algorithmic problem-solving in grid reachability and frequency analysis, testing concepts such as grid/graph traversal and obstacle handling for path existence alongside frequency counting and selection for top-k elements.

  • Medium
  • Meta
  • Coding & Algorithms
  • Software Engineer

Solve grid path and top‑k frequency

Company: Meta

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Technical Screen

Part A — Grid Reachability with Obstacles: Given an m×n matrix of 0s and 1s where 0 indicates a passable cell and 1 indicates a blocked cell, starting at (0, 0) determine whether there exists a path to the bottom-right cell (m−1,n− 1). You may move up, down, left, or right within bounds and cannot enter blocked cells. Return true if such a path exists, otherwise false. Part B — Top‑K Frequent Numbers: Given an array of integers and an integer k, return the k numbers that appear most frequently in the array. If multiple numbers have the same frequency, any order among them is acceptable.

Quick Answer: This question evaluates algorithmic problem-solving in grid reachability and frequency analysis, testing concepts such as grid/graph traversal and obstacle handling for path existence alongside frequency counting and selection for top-k elements.

Related Interview Questions

  • Solve Tree Columns And Maze Variants - Meta (medium)
  • Solve a Key-Door Corridor Maze - Meta (medium)
  • Solve Array Merge and Parentheses Cleanup - Meta (medium)
  • Solve Two Backtracking Array Problems - Meta (hard)
  • Solve Maze and Suffix Problems - Meta (medium)
Meta logo
Meta
Sep 6, 2025, 12:00 AM
Software Engineer
Technical Screen
Coding & Algorithms
2
0

Part A — Grid Reachability with Obstacles: Given an m×n matrix of 0s and 1s where 0 indicates a passable cell and 1 indicates a blocked cell, starting at (0, 0) determine whether there exists a path to the bottom-right cell (m−1,n− 1). You may move up, down, left, or right within bounds and cannot enter blocked cells. Return true if such a path exists, otherwise false.

Part B — Top‑K Frequent Numbers: Given an array of integers and an integer k, return the k numbers that appear most frequently in the array. If multiple numbers have the same frequency, any order among them is acceptable.

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Meta•More Software Engineer•Meta Software Engineer•Meta 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.