programming.dev
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
JPDev to Programmer Humor · 1 year ago

Returns a sorted list in O(1) time

message-square
27
link
fedilink
280

Returns a sorted list in O(1) time

JPDev to Programmer Humor · 1 year ago
message-square
27
link
fedilink
  • asudox@lemmy.world
    link
    fedilink
    arrow-up
    3
    arrow-down
    1
    ·
    1 year ago

    50/50 chance of being right in O(1) time

    • Rikudou_Sage@lemmings.world
      link
      fedilink
      English
      arrow-up
      8
      ·
      1 year ago

      It’s right much more often than just 50/50.

    • andnekon
      link
      fedilink
      arrow-up
      5
      ·
      1 year ago

      50/50 would be for isOdd with the same implementation

    • Lmaydev
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      Primes are not that common especially as numbers get bigger.

      It’ll be right the vast majority of times.

Programmer Humor

programmer_humor

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 712 users / day
  • 4.42K users / week
  • 8.18K users / month
  • 18K users / 6 months
  • 2.4K local subscribers
  • 23.4K subscribers
  • 1.4K Posts
  • 52.3K Comments
  • Modlog
  • mods:
  • adr1an
  • Feyter
  • BurningTurtle
  • Pierre-Yves Lapersonne
  • BE: 0.19.11
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org