Skip to content

Missing Edge Case for odd_even_transposition_parallel.py #10925

Closed
@RaymondDashWu

Description

@RaymondDashWu

Repository commit

28302db

Python version (python --version)

3.11.6

Dependencies version (pip freeze)

Only default libraries used in this file

Expected behavior

When creating tests for this file I found a bug. Creating a list with 0 to 11 (or higher) in reverse leads to odd behavior. However, creating a list from 0 to 10 and 0 to 5 seems to work.

odd_even_transposition(list(range(11)[::-1])) outputs
[1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 10]

Actual behavior

[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions