Search
⌘K

Leetcode 756. Pyramid Transition Matrix

Given a bottom string and a list of allowed triples where each pair of adjacent blocks maps to one or more possible top blocks, determine whether you can build a single-block pyramid by repeatedly stacking allowed tops over each adjacent pair. The core challenge is exploring the exponential space of possible upper rows (backtracking/DFS, often with memoization/pruning) to find a sequence of valid rows up to the apex.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.