300_are_queue's blog

By 300_are_queue, history, 3 years ago, In English

Things that I have heard of and know (imagine how many things I haven't even heard of):

  • Binary search

If you don't know at least 1 of these things and you are not red — you are doing it wrong. Stop learning useless algorithms, go and solve some problems, learn how to use binary search.

  • Vote: I like it
  • +382
  • Vote: I do not like it

| Write comment?
»
3 years ago, # |
  Vote: I like it -26 Vote: I do not like it

i don't know what it is, can u teach me?

»
3 years ago, # |
  Vote: I like it +33 Vote: I do not like it

Things that I haven't heard of and don't know (imagine how many things I have heard of):

Two pointers

If you know at least 3 of these things and you are red — you are doing it right. Continue learning useless algorithms, don't go and solve some problems, learn how to use FFT.

  • »
    »
    3 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I can't implement this algorithm. How do I use pointers in Python?

    • »
      »
      »
      3 years ago, # ^ |
        Vote: I like it +20 Vote: I do not like it

      To use two pointers you have to think like two pointers. On early stages it's better to imagine that your friend is the first pointer and you are the second.

»
3 years ago, # |
  Vote: I like it +95 Vote: I do not like it

wtf bro, where does a taxi driver need a binary search?

  • »
    »
    3 years ago, # ^ |
      Vote: I like it +57 Vote: I do not like it

    To find a passenger of height h among n passengers standing in the sorted order of their heights.

    • »
      »
      »
      3 years ago, # ^ |
        Vote: I like it +16 Vote: I do not like it

      wtf bro why does the driver have to give a damn about the height as long as they are not > 6.5 feet?

      • »
        »
        »
        »
        3 years ago, # ^ |
          Vote: I like it +13 Vote: I do not like it

        Maybe they are binary searching to find the person with a height of 6.5 feet :)

»
3 years ago, # |
  Vote: I like it +3 Vote: I do not like it

binary search is used in bitmasks only to find the count of (2)s in this mask

»
3 years ago, # |
  Vote: I like it +16 Vote: I do not like it

I'm just waiting for the day when I find a problem with my binary search implementation, then my list of "things I know" will finally be empty

»
3 years ago, # |
  Vote: I like it +15 Vote: I do not like it

Teach me this dark art you speak of. What is it capable of?

  • »
    »
    3 years ago, # ^ |
      Vote: I like it +124 Vote: I do not like it

    Let's say you have a list of girls (or boys?) that you like, sorted by how cool they are. Let's further assume that a person will not date you if they are too cool for you. Then you can use binary search to find the best person that will date you, only within a very few embarrassing attempts to ask somebody out.

»
3 years ago, # |
  Vote: I like it -58 Vote: I do not like it

Ok, that's obviously a lie because in 133492526 You used dp and number theory. And it is only one sumbission. P.s. I know it is a joke...

  • »
    »
    3 years ago, # ^ |
      Vote: I like it +4 Vote: I do not like it

    You know, technically it could be the truth if he wasn't the real author of the code from that submission... Or he independently reinvented DP without knowing what it is... Or it was indeed just a joke.

»
3 years ago, # |
  Vote: I like it +11 Vote: I do not like it

it is so funny i forgot to laugh

»
3 years ago, # |
  Vote: I like it +8 Vote: I do not like it

umnik approves

»
3 years ago, # |
  Vote: I like it 0 Vote: I do not like it

I see, so that's exactly and the only reason I'm not purple, because I don't know Binary search

»
3 years ago, # |
  Vote: I like it +29 Vote: I do not like it

Things that I have heard of and know (imagine how many things I haven't even heard of):

If you don't know at least 1 of these things and you are not green — you are doing it wrong. Stop learning useless algorithms, go and solve some problems, learn how to use binary search.

  • »
    »
    3 years ago, # ^ |
      Vote: I like it +15 Vote: I do not like it

    lomien stop learning and reciting useless chinese data structure algorithms

  • »
    »
    3 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    The only thing I would insert here is how to read input data.

»
2 months ago, # |
  Vote: I like it -20 Vote: I do not like it

U are so humorous.

»
2 months ago, # |
  Vote: I like it -22 Vote: I do not like it

Yeah. If the array is sorted then Binary search is great as it runs in $$$O(\log{n})$$$ time. That means it can search an element from a sorted array of $$$1,000,000,000$$$ elements in at most $$$30$$$ steps.

»
2 months ago, # |
  Vote: I like it +8 Vote: I do not like it

No way I Reached specialist without knowing HLD and Square Root decomposition.