You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add q_monotonic as a helper function to remove nodes from a linked
list if a node with a strictly greater or lesser value exists to its
right, depending on the descend parameter.
The q_monotonic function iterates from the end (descend=true) or
start (descend=false), tracking the maximum value seen so far with
strcmp, and deletes nodes violating the monotonic condition.
The q_ascend and q_descend functions call q_monotonic with descend
set to false and true, respectively.
Change-Id: Ia3ce39acbf5578a6e4109e58257dbd18a6eebd74
0 commit comments