What the Heck is Memoization? How Would I Use it?

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ม.ค. 2025

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

  • @MrMarkgyuro
    @MrMarkgyuro 5 ปีที่แล้ว +2

    i would like to say thank you. in my opinion a hard concept to understand, yet explained clearly!

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

    Thanks for explaining this complex concept of memorization along with code. Appreciated!

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

    thanks, good tutorial

  • @HiHi-qd5oy
    @HiHi-qd5oy 5 ปีที่แล้ว

    Why is the memoized fibonacci function executed, aka its syntax ends with "( )" after the closed curly bracket ?

    • @AllThingsJavaScript
      @AllThingsJavaScript  5 ปีที่แล้ว +1

      Parentheses cause a function to invoke. So putting the parens after the function expression causes it to run. This structure is called an Immediately Invoked Function Expressions: th-cam.com/video/w71IVgfsOL0/w-d-xo.html

  • @shreddyvedder8065
    @shreddyvedder8065 5 ปีที่แล้ว

    why did you modify the result object with the .parameter extension?

    • @AllThingsJavaScript
      @AllThingsJavaScript  5 ปีที่แล้ว +2

      What I did was I added the parameter value to the result object and assigned it to the parameter property. Does that help?

    • @MrMarkgyuro
      @MrMarkgyuro 5 ปีที่แล้ว

      www.w3schools.com/js/js_object_properties.asp it may be useful : )

    • @MrMarkgyuro
      @MrMarkgyuro 5 ปีที่แล้ว

      @@AllThingsJavaScript so with aFun.memoCache the 5 gonna be the key for the object and the value gonna be the object with key parameter and value 5. This is kinda wrapping object inside object?

    • @AllThingsJavaScript
      @AllThingsJavaScript  5 ปีที่แล้ว

      @@MrMarkgyuro Since functions are objects in JavaScript, this is possible.

  • @new_artiko
    @new_artiko 4 ปีที่แล้ว

    you are amazinG! very much thank U!!

  • @Kreshel1
    @Kreshel1 4 ปีที่แล้ว

    1.5 speed to emulate normal speed