Daily challenge for 2026-07-04
550. Signal Peak Filter
You are given a sequence of signal intensities. A signal is considered 'unstable' if it is immediately followed by a strictly weaker signal. To stabilize the sequence, you must repeatedly remove any signal that is strictly greater than the signal immediately to its right. This process continues until no signal is strictly greater than the one to its right (the sequence becomes non-decreasing). Return the final stabilized sequence.
Example:Input: signals = [5, 4, 3, 2, 1]Output: [1]
Input: signals = [1, 3, 2, 4]Output: [1, 2, 4]
Run this challenge interactively in Python or JavaScript when the app loads.