Skip to content

review chapter 3 #2

@rioj7

Description

@rioj7
  • don't call your variables list, list is a build in type and you loose the constructor
  • in bubble sort add a test if done a swap in a pass, if not => data is sorted
  • no need to return the list because a list is a mutable data structure, make a copy of the list (data[:]) if needed to have different sorted list
  • in insertion sort test for (j >= 0) before testing value in list, -1 is a valid list index

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions