PracHub
QuestionsCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Meta

Solve coding and AI-assisted tasks

Last updated: May 7, 2026

Quick Overview

This set evaluates algorithmic problem-solving across arrays, immutable linked-list interfaces, parent-pointer tree traversal, string validity via minimal edits, and grid-based pathfinding including an AI-assisted maze search, testing data-structure knowledge, complexity reasoning, and handling of constrained APIs.

  • medium
  • Meta
  • Coding & Algorithms
  • Backend Engineer

Solve coding and AI-assisted tasks

Company: Meta

Role: Backend Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Onsite

This interview included several algorithm problems across a phone screen, onsite coding, and an AI-assisted coding round. Solve the following tasks: 1. **Right-side visibility in a skyline**: Given an integer array `heights`, where `heights[i]` is the height of the `i`-th building from left to right, return the indices of buildings that can see the ocean on the right. A building can see the ocean if every building to its right is strictly shorter. Return the indices in increasing order, and be prepared to discuss edge cases. 2. **Print an immutable linked list in reverse**: You are given the head of a singly linked list whose nodes expose only `getNext()` and `printValue()` methods. You may not modify the list. Print the values from tail to head. First discuss multiple approaches, then implement the simplest correct approach. 3. **Find a common ancestor with parent pointers**: You are given two nodes in a tree. Each node has a pointer to its parent. Return their lowest common ancestor. 4. **Remove the fewest invalid parentheses**: Given a string containing lowercase letters and parentheses, remove the minimum number of parentheses so that the result is valid. Return any valid result. 5. **AI-assisted maze search**: In a separate AI-enabled coding round, solve a grid-maze problem. Given a 2D grid containing a start cell `S`, an end cell `E`, open cells `.`, and walls `#`, determine whether `E` is reachable from `S` using 4-directional movement. Be ready for common follow-ups such as returning the shortest path length or reconstructing one valid path.

Quick Answer: This set evaluates algorithmic problem-solving across arrays, immutable linked-list interfaces, parent-pointer tree traversal, string validity via minimal edits, and grid-based pathfinding including an AI-assisted maze search, testing data-structure knowledge, complexity reasoning, and handling of constrained APIs.

Related Interview Questions

  • Palindrome After Deleting at Most One Character - Meta (medium)
  • Validate Sorted Order Under a Custom Alphabet - Meta (medium)
  • Find Shortest Unique Prefixes - Meta (medium)
  • Compute Exclusive Execution Times - Meta (medium)
  • Solve Tree Columns And Maze Variants - Meta (medium)
|Home/Coding & Algorithms/Meta

Solve coding and AI-assisted tasks

Meta logo
Meta
Apr 8, 2026, 12:00 AM
mediumBackend EngineerOnsiteCoding & Algorithms
7
0
Practice Read
Loading...

This interview included several algorithm problems across a phone screen, onsite coding, and an AI-assisted coding round. Solve the following tasks:

  1. Right-side visibility in a skyline : Given an integer array heights , where heights[i] is the height of the i -th building from left to right, return the indices of buildings that can see the ocean on the right. A building can see the ocean if every building to its right is strictly shorter. Return the indices in increasing order, and be prepared to discuss edge cases.
  2. Print an immutable linked list in reverse : You are given the head of a singly linked list whose nodes expose only getNext() and printValue() methods. You may not modify the list. Print the values from tail to head. First discuss multiple approaches, then implement the simplest correct approach.
  3. Find a common ancestor with parent pointers : You are given two nodes in a tree. Each node has a pointer to its parent. Return their lowest common ancestor.
  4. Remove the fewest invalid parentheses : Given a string containing lowercase letters and parentheses, remove the minimum number of parentheses so that the result is valid. Return any valid result.
  5. AI-assisted maze search : In a separate AI-enabled coding round, solve a grid-maze problem. Given a 2D grid containing a start cell S , an end cell E , open cells . , and walls # , determine whether E is reachable from S using 4-directional movement. Be ready for common follow-ups such as returning the shortest path length or reconstructing one valid path.

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

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