Let's sort the Linked List

Step 1: 6425122211Step 2: 1164251222Step 3: 1112642522Step 4: 1112226425Step 5: 1112222564 \text{Step 1: } \, \, \, \, \, \, \, \, \large{ \boxed{64} \rightarrow \boxed{25} \rightarrow \boxed{12} \rightarrow \boxed{22} \rightarrow \boxed{11}} \\ \text{Step 2: } \, \, \, \, \, \, \, \, \large{ \boxed{11} \rightarrow \boxed{64} \rightarrow \boxed{25} \rightarrow \boxed{12} \rightarrow \boxed{22} } \\ \text{Step 3: } \, \, \, \, \, \, \, \, \large{ \boxed{11} \rightarrow \boxed{12} \rightarrow \boxed{64} \rightarrow \boxed{25} \rightarrow \boxed{22} } \\ \text{Step 4: } \, \, \, \, \, \, \, \, \large{ \boxed{11} \rightarrow \boxed{12} \rightarrow \boxed{22} \rightarrow \boxed{64} \rightarrow \boxed{25} } \\ \text{Step 5: } \, \, \, \, \, \, \, \, \large{ \boxed{11} \rightarrow \boxed{12} \rightarrow \boxed{22} \rightarrow \boxed{25} \rightarrow \boxed{64} }

Which sorting technique is being used above to sort the linked list ?

Note: The sorting algorithm being used in this case is most likely to be implemented in something like a linked list, where it is simple to add and remove elements.

×

Problem Loading...

Note Loading...

Set Loading...