### Problem
dominoes contains L and R for initial left/right pushes and . for upright dominoes. Every second, a falling domino pushes its upright neighbor in that direction. Simultaneous equal-time pushes from both sides cancel, leaving that domino upright. A push adds no force to an already falling or fallen domino. Return the final state.
```cpp
class Solution {
public:
string pushDominoes(string dominoes);
};
```
### Examples
**Example 1:**
```text
dominoes = "R...L"
Output: "RR.LL"
Explanation: The center receives opposite pushes at the same time and stays upright.
```
**Example 2:**
```text
dominoes = "L..R"
Output: "L..R"
Explanation: The pushed endpoints fall away from the two upright dominoes.
```
### Constraints
- Domino count lies in [1,100000].
- Every character is L, R or a dot.
### Contract considerations
Preserve simultaneous timing and cancellation.
```hint Read the boundary condition
Can distance from the nearest effective push encode arrival time?
```
### Boundary reminders
Preserve simultaneous timing and cancellation.
Overview: Resolve Simultaneous Left and Right Domino Pushes. dominoes contains L and R for initial left/right pushes and .
dominoes contains L and R for initial left/right pushes and . for upright dominoes. Every second, a falling domino pushes its upright neighbor in that direction. Simultaneous equal-time pushes from both sides cancel, leaving that domino upright. A push adds no force to an already falling or fallen domino. Return the final state.
class Solution {
public:
string pushDominoes(string dominoes);
};
Examples
Example 1:
dominoes = "R...L"
Output: "RR.LL"
Explanation: The center receives opposite pushes at the same time and stays upright.
Example 2:
dominoes = "L..R"
Output: "L..R"
Explanation: The pushed endpoints fall away from the two upright dominoes.