Please solve the programming task below using a self-contained code snippet in a markdown code block.

You are given a 0-indexed integer array nums. In one step, remove all elements nums[i] where nums[i - 1] > nums[i] for all 0 < i < nums.length.
Return the number of steps performed until nums becomes a non-decreasing array.
 
Please complete the following python code precisely:
```python
class Solution:
    def totalSteps(self, nums: List[int]) -> int:
```