Given six strings.
"aa"
"abc"
"dad"
"a"
"aaaa"
"cab"Manually perform a stable sorting in ascending order based on their lengths, ensuring that the longest string appears at the bottom.
Tip: Stable sorting maintains the original order of elements with equal values, as they appear in the input, ensuring consistency in sorting results.