Skip to content

GuillotineBinPack::MergeFreeList is not theta(n^2) #33

@jube

Description

@jube

Calling erase which is O(n) in the middle of the loop makes the algorithm worse than theta(n^2). erase could be replaced with a swap between the erased element and the last element, and a pop_back (both are O(1)).

Great project, great article. I will use the Guillotine algorithm(s) in my project!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions