Sorting Algorithm With Minimum Swaps For Bracket