Practice Push Dominoes
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
In dominoes, L and R mark initial pushes left and right, while . marks an upright unpushed domino. All initial pushes happen simultaneously. Each second a falling domino pushes its adjacent upright neighbor in the same direction. Equal-time pushes from both sides balance and leave an upright domino standing. A falling or fallen domino receives no additional force. Return the final L, R and . state string.
Source: Push Dominoes on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
dominoes = "RR.L"
"RR.L"
# Example 2
dominoes = ".L.R...LR..L.."
"LL.RR.LLRRLL.."
Constraints
Related LeetCode Problems
Practice more problems similar to Push Dominoes.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.