<p>You are given a string <code>s</code> (<strong>0-indexed</strong>). You are asked to perform the following operation on <code>s</code> until you get a sorted string:</p>
<ol>
<li>Find <strong>the largest index</strong><code>i</code> such that <code>1 <= i < s.length</code> and <code>s[i] < s[i - 1]</code>.</li>
<li>Find <strong>the largest index</strong><code>j</code> such that <code>i <= j < s.length</code> and <code>s[k] < s[i - 1]</code> for all the possible values of <code>k</code> in the range <code>[i, j]</code> inclusive.</li>
<li>Swap the two characters at indices <code>i - 1</code> and <code>j</code>.</li>
<li>Reverse the suffix starting at index <code>i</code>.</li>
</ol>
<p>Return <em>the number of operations needed to make the string sorted.</em> Since the answer can be too large, return it <strong>modulo</strong><code>10<sup>9</sup> + 7</code>.</p>