Skip to content

Bubble Sort Readme Code Issue #838

@bull-xu

Description

@bull-xu

Bubble Sort Readme Code Issue

The sample code in the Bubble Sort Readme.md file has error.

Code

Code in the readme file:

	if array[j] < array[i] {
		let tmp = array[i]
		array[i] = array[j]
		array[j] = tmp
	}

The source code doesn't have the error:

	if array[j] < array[j - 1] {
		let tmp = array[j - 1]
		array[j - 1] = array[j]
		array[j] = tmp
	}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions