





'''simple docstring'''







from __future__ import annotations

def    __UpperCamelCase	(	a    : list     ) ->list:
 if len(a     ) == 0:
  return []
 snake_case				,		snake_case				=			min(a     ), max(a     )
 snake_case				=			int(max_value - min_value     ) + 1
 snake_case				=			[[] for _ in range(a     )]

 for i in my_list:
  buckets[int(i - min_value     )].append(a     )

 return [v for bucket in buckets for v in sorted(a     )]


if __name__ == "__main__":
       from doctest import testmod

       testmod()
       assert bucket_sort([4, 5, 3, 2, 1]) == [1, 2, 3, 4, 5]
       assert bucket_sort([0, 1, -10, 15, 2, -2]) == [-10, -2, 0, 1, 2, 15]








'''simple docstring'''







from __future__ import annotations

from collections.abc import Iterator
class 			_lowercase						:







     def __init__( self    ,   A__    ) ->	None:
      snake_case				=			value
      snake_case				=			None
      snake_case				=			None




class 			_lowercase						:







     def __init__( self    ,   A__    ) ->	None:
      snake_case				=			tree







     def     UpperCamelCase			( self    ,   A__    ) ->	int:
      if node is None:
       return 0
      return node.value + (
          self.depth_first_search(node.left    ) + self.depth_first_search(node.right    )
      )







     def __iter__( self    ) ->	Iterator[int]:
      yield self.depth_first_search(self.tree    )


if __name__ == "__main__":
   import doctest

   doctest.testmod()

