You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
The text was updated successfully, but these errors were encountered:
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 apop_back
(both are O(1)).Great project, great article. I will use the Guillotine algorithm(s) in my project!
The text was updated successfully, but these errors were encountered: