





"""simple docstring"""






import operator

def       __A (     a_  :list				,    a_  :bool = False				,    a_  :list | None = None)						->						list:
				__a	:  Tuple         =					operator.lt if reverse else operator.gt
				__a	:  Union[str, Any]         =					solution or []

				if not arr:
								return solution

				__a	:  Optional[int]         =					[arr.pop(0)]
				for i, item in enumerate(a_):
								if _operator(a_				,    sublist[-1]):
												sublist.append(a_)
												arr.pop(a_)

    #  merging sublist into solution list
				if not solution:
								solution.extend(a_)
				else:
								while sublist:
												__a	:  Union[str, Any]         =					sublist.pop(0)
												for i, xx in enumerate(a_):
																if not _operator(a_				,    a_):
																				solution.insert(a_				,    a_)
																				break
												else:
																solution.append(a_)

				strand_sort(a_				,    a_				,    a_)
				return solution


if __name__ == "__main__":
		assert strand_sort([4, 3, 5, 1, 2]) == [1, 2, 3, 4, 5]
		assert strand_sort([4, 3, 5, 1, 2], reverse=True) == [5, 4, 3, 2, 1]






"""simple docstring"""






def       __A (     a_  :int				,    a_  :int)						->						str:
				if a < 0 or b < 0:
								raise ValueError('''the value of both inputs must be positive''')

				__a	:  Union[str, Any]         =					str(bin(a_))[2:]  # remove the leading "0b"
				__a	:  Union[str, Any]         =					str(bin(a_))[2:]  # remove the leading "0b"

				__a	:  Optional[Any]         =					max(len(a_)				,    len(a_))

				return "0b" + "".join(
				    str(int(char_a != char_b))
				    for char_a, char_b in zip(a_binary.zfill(a_)				,    b_binary.zfill(a_)))


if __name__ == "__main__":
		import doctest

		doctest.testmod()