=========== Bubble Sort =========== :doc:`/WorkProcessClassifiers/GlobalAlgorithm/index` - :doc:`/WorkProcessClassifiers/OneDimensionalAlgorithm/index` *Bubble sort* algorithm is a simple sorting algorithm that sorts the target data elements by comparing and swapping the adjacent items. Its average and worst case performance is :math:`O(n^2)`\ . .. rubric:: Input Parameters +--------------------+--------------------------------------------+----------------------------------------+-------------+---------+ | Parameter | Type | Constraint | Description | Remarks | +====================+============================================+========================================+=============+=========+ | :math:`Y` | :math:`Y \in \mathbb R^N` | :math:`N \in \mathbb{N}` | | | +--------------------+--------------------------------------------+----------------------------------------+-------------+---------+ .. rubric:: Output Parameters +----------------------------+----------------------------------------------------+----------------------------------------+---------------------------------------------------+--------------------------------------------------------------------------------------+ | Parameter | Type | Constraint | Description | Remarks | +============================+====================================================+========================================+===================================================+======================================================================================+ | :math:`\hat{Y}` | :math:`\hat{Y} \in \mathbb R^N` | :math:`N \in \mathbb{N}` | Sorted data sequence of length :math:`N` | The output result is sensitive to improper values such as 'nan', 'inf', 'null', etc. | +----------------------------+----------------------------------------------------+----------------------------------------+---------------------------------------------------+--------------------------------------------------------------------------------------+ .. rubric:: Single Steps using the Algorithm * :doc:`/DataPreprocessing/DataTransformation/DataSorting/DataSortingWithBubbleSort/index` .. rubric:: References - D.\ Knuth, The Art of Computer Programming, vol. 3: Sorting and Searching, 3rd Edition, Addison-Wesley, 1997.