Memoize | Leetcode 2623 | Cache in JavaScript | 30 Days of JavaScript

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

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

  • @learnwithchirag
    @learnwithchirag  9 หลายเดือนก่อน +2

    Hey there! 👋 For more interesting content, tutorials, and updates, Feel free to connect with me on
    Instagram Handles :-
    @createwithchirag - instagram.com/createwithchirag/
    @learn.with.chirag - instagram.com/learn.with.chirag/
    LinkedIn: www.linkedin.com/in/chirag-sehgal-9200111b8/
    Let's stay connected and keep the creativity flowing! 💡

  • @ImranArshad-t4g
    @ImranArshad-t4g 5 หลายเดือนก่อน +1

    The way of explaining is outclass, you deserve millions of subscribers. Please keeeep it up

    • @learnwithchirag
      @learnwithchirag  5 หลายเดือนก่อน +1

      I am so glad that you are loving the content ❤️ Do share it with more people too 🎉

  • @syedmoinudeen1072
    @syedmoinudeen1072 5 หลายเดือนก่อน +1

    Ur the best man , u explain everything really good ❤

  • @NLPrasad
    @NLPrasad 10 หลายเดือนก่อน

    you are best well explained

    • @learnwithchirag
      @learnwithchirag  10 หลายเดือนก่อน

      Thanks a lot ❤️.. I am glad you liked it.....Do share with your friends 😄

  • @vedantkulkarni5860
    @vedantkulkarni5860 19 วันที่ผ่านมา

    crazzy

  • @0991handle
    @0991handle 10 หลายเดือนก่อน

    what JSON.stringify is doing and how this code is running for all args if no for loop is there? can u explain?

    • @learnwithchirag
      @learnwithchirag  8 หลายเดือนก่อน +2

      The use of ...args and JSON.stringify cleverly eliminates the need for a loop to handle each argument individually:
      1) ...args is an array containing all arguments passed to the function. This can handle any number of arguments.
      2) JSON.stringify(args) turns this array into a single string that represents all arguments regardless of their number or type.
      Since all arguments are included in the single string used as a cache key, there's no need to individually process each argument to determine if we've seen this particular combination before.