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
The q_sort function uses a top-down merge sort algorithm to
recursively divide the queue into two halves at the middle node,
identified by front-end pointer traversal. It sorts each half and
merges them with q_merge_two helper function.
The q_merge_two compares adjacent elements from both halves using
strcmp and builds the sorted list in head based on the descend
parameter.
Change-Id: Ibda66d6609df46efe52b9abb1eef5d9dda1e24f9
0 commit comments