
from __future__ import annotations


def 							__A(lowerCAmelCase						,  lowerCAmelCase )		->				list[str]:

		"""simple docstring"""






		if partitions <= 0:
				raise ValueError("""partitions must be a positive number!""" )
		if partitions > number_of_bytes:
				raise ValueError("""partitions can not > number_of_bytes!""" )
		_UpperCamelCase						    =	number_of_bytes // partitions
		_UpperCamelCase						    =	[]
		for i in range(lowerCAmelCase ):
				_UpperCamelCase						    =	i * bytes_per_partition + 1
				_UpperCamelCase						    =	(
				    number_of_bytes if i == partitions - 1 else (i + 1) * bytes_per_partition
				)
				allocation_list.append(F'{start_bytes}-{end_bytes}' )
		return allocation_list


if __name__ == "__main__":
		import doctest

		doctest.testmod()





def 							__A(lowerCAmelCase )		->				list[list[int]]:

		"""simple docstring"""






		_UpperCamelCase						    =	[]
		if len(lowerCAmelCase ) == 1:
				return [nums.copy()]
		for _ in range(len(lowerCAmelCase ) ):
				_UpperCamelCase						    =	nums.pop(0 )
				_UpperCamelCase						    =	permute(lowerCAmelCase )
				for perm in permutations:
						perm.append(lowerCAmelCase )
				result.extend(lowerCAmelCase )
				nums.append(lowerCAmelCase )
		return result


def 							__A(lowerCAmelCase )		->				Optional[int]:

		"""simple docstring"""






		def backtrack(lowerCAmelCase ):
				if start == len(lowerCAmelCase ) - 1:
						output.append(nums[:] )
				else:
						for i in range(lowerCAmelCase						,  len(lowerCAmelCase ) ):
								_UpperCamelCase    ,	_UpperCamelCase						    =	nums[i], nums[start]
								backtrack(start + 1 )
								_UpperCamelCase    ,	_UpperCamelCase						    =	nums[i], nums[start]  # backtrack

		_UpperCamelCase						    =	[]
		backtrack(0 )
		return output


if __name__ == "__main__":
		import doctest

		# use res to print the data in permute2 function
		lowerCamelCase__	=							permutea([1, 2, 3])
		print(res)
		doctest.testmod()



