Post History
Stax, 12 bytes ä╫◙=♥:≡ƒélΣæ Run and debug it +3 after correcting it(thanks, HakerH) Explanation b%s%>{s}M|-%1= b copy the two inputs %s%> is the first's length...
Answer
#2: Post edited
# [Stax](https://github.com/tomtheisen/stax), 9 [bytes](https://github.com/tomtheisen/stax/blob/master/docs/packed.md#packed-stax)▐╡«ùoÆ▓┼■[Run and debug it](https://staxlang.xyz/#p=deb5ae976f92b2c5fe&i=%22ADOBE%22+%22ABODE%22%0A%22TUPLE%22+%22TULIP%22%0A%22ABCDE%22+%22DADBC%22%0A%22BAR%22+%22BARN%22%0A%22BARN%22+%22BARREN%22&m=2)- ## Explanation
- ```
b<{s}M|-%1=b copy the two inputs< is the first < second?{s}M if so, swap the two|- multiset difference% is the length of the difference1= equal to 1?
- # [Stax](https://github.com/tomtheisen/stax), 12 [bytes](https://github.com/tomtheisen/stax/blob/master/docs/packed.md#packed-stax)
- ä╫◙=♥:≡ƒélΣæ
- [Run and debug it](https://staxlang.xyz/#p=84d70a3d033af09f826ce491&i=%22ADOBE%22+%22ABODE%22%0A%22TUPLE%22+%22TULIP%22%0A%22ABCDE%22+%22DADBC%22%0A%22BAR%22+%22BARN%22%0A%22BARN%22+%22BARREN%22%0A%22AC%22+%22ABC%22&m=2)
- +3 after correcting it(thanks, HakerH)
- ## Explanation
- ```
- b%s%>{s}M|-%1=
- b copy the two inputs
- %s%> is the first's length < second?
- {s}M if so, swap the two
- |- multiset difference
- % is the length of the difference
- 1= equal to 1?
#1: Initial revision
# [Stax](https://github.com/tomtheisen/stax), 9 [bytes](https://github.com/tomtheisen/stax/blob/master/docs/packed.md#packed-stax) ▐╡«ùoÆ▓┼■ [Run and debug it](https://staxlang.xyz/#p=deb5ae976f92b2c5fe&i=%22ADOBE%22+%22ABODE%22%0A%22TUPLE%22+%22TULIP%22%0A%22ABCDE%22+%22DADBC%22%0A%22BAR%22+%22BARN%22%0A%22BARN%22+%22BARREN%22&m=2) ## Explanation ``` b<{s}M|-%1= b copy the two inputs < is the first < second? {s}M if so, swap the two |- multiset difference % is the length of the difference 1= equal to 1?