Introduction
In a world where socks go missing at an alarming rate, a group of brilliant minds came together to tackle the age-old problem of sock sorting. They asked themselves: "What if we could harness the power of algorithms to sort these pesky socks?"
Problem Statement
Given a pair of socks with unique identifiers, sort them into two piles: one for matching pairs and one for singles.
- Input: A list of sock IDs
- Output: Two lists of sorted socks
Approaches
- Brute Force Sorting: Iterate through all possible combinations, checking for matches.
- Quick Sort Sock Sorting: Divide and conquer, using a divide-and-conquer strategy.
- Hungarian Sock Sorting: A variation of Quick Sort, with a dash of Hungarian flair.