A bubble sort takes a list of non-repeating integers and sorts them in ascending order, with only the use of one operation: switching two numbers which are next to eachother.
However for this puzzle, you must take in two strings, which are both anagrams, and bubble sort the letters of the first string into the second.
TRAP TRPA TPRA PTRA PTAR PATR PART
- Your program must only use the switching operation
- Your program must use the most optimal way of bubble sorting
- This is code golf, lowest amount of bytes wins!