Uber OA 2026 | Alternating Sign Grid DP & Top K Frequent Elements
Uber · Question · Posted Jun 2026
Problem 1 - Maximum Path Sum in a Grid with Alternating Sign Restrictions Problem Statement You are given an M × N integer matrix grid. Starting from the top-left cell, you must reach the bottom-right cell by moving only: Right Down The path must satisfy an alternating sign constraint: Positive → Negative is allowed Negative → Positive is allowed Zero can transition to or from any value Two consecutive positive values are not allowed Two consecutive negative values are not ...
The full answer & interview discussion are available to premium members.
Log in Create a free account