#K6166. Wedding Seating Arrangement
Wedding Seating Arrangement
Wedding Seating Arrangement
In this problem, you are given a list of guest names for a wedding. Your task is to sort the guest names in a case-insensitive manner using Merge Sort and Quick Sort algorithms. You need to implement both sorting algorithms and then print the sorted result twice:
- The first line should display the names sorted using Merge Sort.
- The second line should display the names sorted using Quick Sort.
Note that the sorting should be done without considering the case of the letters, i.e., the comparison should be case-insensitive. For any two names \( a \) and \( b \), they are compared based on \( \text{toLower}(a) \) and \( \text{toLower}(b) \).
inputFormat
The input is provided via standard input (stdin) as a single line containing the guest names separated by spaces.
For example:
Charlie Alice Bob
outputFormat
The output should consist of two lines printed to standard output (stdout):
- The first line contains the guest names sorted using Merge Sort.
- The second line contains the guest names sorted using Quick Sort.
Each sorted list should display the names separated by a single space.
## sampleCharlie Alice Bob
Alice Bob Charlie
Alice Bob Charlie
</p>