• 0 Posts
  • 6 Comments
Joined 1 year ago
cake
Cake day: May 4th, 2024

help-circle



  • I don’t think you can check if array of n elements is sorted in O(1), if you skip the check though and just assume it is sorted now (have faith), then the time would be constant, depending on how long you’re willing to wait until the miracle happens. As long as MTM (Mean Time to Miracle) is constant, the faithfull miracle sort has O(1) time complexity, even if MTM is infinite. Faithless miracle sort has at best the complexity of the algorithm that checks if the array is sorted.

    Technically you can to down to O(0) if you assume all array are always sorted.


  • voldage@lemmy.worldtoComics@lemmy.mlCrapitalism
    link
    fedilink
    arrow-up
    4
    arrow-down
    1
    ·
    11 months ago

    Yeah, but you could rent from the government instead of private owners. You have completely no leverage over them, and government could use the rent money to build more housing for renting or sale and drive prices of housing down instead.