






import numpy as np







def 						_UpperCamelCase (     UpperCamelCase_							:       Optional[int]		)	-> List[str]:

						"""simple docstring"""



						lowerCAmelCase__         =    a.shape
						lowerCAmelCase__         =    min(_lowercase     ,							_lowercase		)
						lowerCAmelCase__         =    np.eye(_lowercase		)
						lowerCAmelCase__         =    a.copy()

						for k in range(t - 1		):
												# select a column of modified matrix A':
												lowerCAmelCase__         =    r[k:, [k]]
												# construct first basis vector
												lowerCAmelCase__         =    np.zeros_like(_lowercase		)
												lowerCAmelCase__         =    1.0
												# determine scaling factor
												lowerCAmelCase__         =    np.linalg.norm(_lowercase		)
												# construct vector v for Householder reflection
												lowerCAmelCase__         =    x + np.sign(x[0]		) * alpha * ea
												v /= np.linalg.norm(_lowercase		)

												# construct the Householder matrix
												lowerCAmelCase__         =    np.eye(m - k		) - 2.0 * v @ v.T
												# pad with ones and zeros as necessary
												lowerCAmelCase__         =    np.block([[np.eye(_lowercase		), np.zeros((k, m - k)		)], [np.zeros((m - k, k)		), q_k]]		)

												lowerCAmelCase__         =    q @ q_k.T
												lowerCAmelCase__         =    q_k @ r

						return q, r


if __name__ == "__main__":
					import doctest

					doctest.testmod()









'''simple docstring'''



def       _a      (		_lowercase   :      list    ):





     '''simple docstring'''






     if len(_lowercase    ) <= 1:
          return data
     else:
          return [
              *quick_sort([e for e in data[1:] if e <= data[0]]    ),
              data[0],
              *quick_sort([e for e in data[1:] if e > data[0]]    ),
          ]


if __name__ == "__main__":
      import doctest

      doctest.testmod()