-- Jan 31 In-Class Exercise Thread
Randomize-In-Place: `O(n)`. n swaps are performed and we only move through the loop once.
Permute-By-Sorting: `O(nlogn)`. Generating priorities is `O(n)`, sorting by those priorities is `O(nlogn)` => `O(nlogn)` dominates.
-Dean Johnson
(
Edited: 2018-01-31)
Randomize-In-Place: @BT@O(n)@BT@. n swaps are performed and we only move through the loop once.
Permute-By-Sorting: @BT@O(nlogn)@BT@. Generating priorities is @BT@O(n)@BT@, sorting by those priorities is @BT@O(nlogn)@BT@ => @BT@O(nlogn)@BT@ dominates.
-Dean Johnson