Big O Zoo (Acing Your Coding Interview) : Data Science Basics

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ก.ย. 2024
  • The most commonly seen Big-O notations and how to spot them!
    Dictionaries / Hash Tables Video: • Dictionaries : Python ...
    Binary Search Video: • The Power of Binary Se...

ความคิดเห็น • 10

  • @NickKravitz
    @NickKravitz 3 ปีที่แล้ว +18

    interview: memoize the fibonacci function such that it runs in linear time. job: our website has an outdated color scheme; change the background from blue to aqua.

    • @ritvikmath
      @ritvikmath  3 ปีที่แล้ว +3

      This is going right into top 10 comments on this channel! Love how accurate it is hahaha

  • @skeletonrowdie1768
    @skeletonrowdie1768 3 ปีที่แล้ว +2

    very clear thank you, though reducing the time complexity can be quite difficult (or just impossible).. I would watch a video about common 'mistakes' or 'improvements' :).

    • @ritvikmath
      @ritvikmath  3 ปีที่แล้ว +2

      Great suggestion!

  • @CptJoeCR
    @CptJoeCR 3 ปีที่แล้ว +1

    Question! At the Quadratic Time section of the code how are you passing the function as a string and calling it? Is there a name for that technique?

    • @ritvikmath
      @ritvikmath  3 ปีที่แล้ว

      I don't know if there is a specific name for it, but it was necessary so that I could get a timing of the function. Good question!

    • @tomtrask_YT
      @tomtrask_YT 3 ปีที่แล้ว

      It's the same in all invocations of timeit (in this sample) - he's passing a snippet of code as a string. He could have passed in a lambda or function reference (I'm guessing that's not the question). I've heard that method of substituting values into a string called interpolation and it's changed forms over the years. It was done

  • @tomtrask_YT
    @tomtrask_YT 3 ปีที่แล้ว

    4:13 - linear time sizes grow exponentially. Maybe you mean:
    [20*i for i in range(...)]
    instead of
    [2**i for i in range(...)]

  • @davidjamriska7299
    @davidjamriska7299 3 ปีที่แล้ว +1

    Nice clean explaination.

    • @ritvikmath
      @ritvikmath  3 ปีที่แล้ว

      Glad it was helpful!