Earnings (Loss) Per Share - Schedule of Stock Options and Restricted Stock Units Not Included in the Diluted Earnings (Loss) Per Share Calculation (Details) - $ / shares shares in Thousands |
3 Months Ended | 6 Months Ended | ||
|---|---|---|---|---|
Apr. 30, 2026 |
Apr. 30, 2025 |
Apr. 30, 2026 |
Apr. 30, 2025 |
|
| Antidilutive Securities Excluded from Computation of Earnings Per Share [Line Items] | ||||
| Exercise prices, lower limit (in dollars per share) | $ 43.83 | $ 82.46 | $ 78.51 | $ 82.46 |
| Exercise prices, upper limit (in dollars per share) | $ 101.54 | $ 101.54 | $ 101.54 | $ 101.54 |
| Stock option shares excluded | ||||
| Antidilutive Securities Excluded from Computation of Earnings Per Share [Line Items] | ||||
| Stock option shares and restricted stock units excluded (in shares) | 3,480 | 1,506 | 1,481 | 1,111 |
| Restricted stock units excluded | ||||
| Antidilutive Securities Excluded from Computation of Earnings Per Share [Line Items] | ||||
| Stock option shares and restricted stock units excluded (in shares) | 1,961 | 586 | 348 | 563 |