Memoization and How to Memoize | Javascript Memoization🔥Frontend Interview Series🔥 Episode 13

Поделиться
HTML-код
  • Опубликовано: 29 янв 2025

Комментарии • 72

  • @TechnicalSuneja
    @TechnicalSuneja  2 года назад +16

    00:00 - Don't skip anything 🙏
    Aur kya haal sabke?
    btao next topic JS kon sa hona chahiye ??

  • @vikasme1299
    @vikasme1299 7 месяцев назад +3

    Thank you bhaiyaa..
    Ek din me bhi successful hokar aapke podcast Parr aaunga❤😂

  • @krishnaupadhyay4265
    @krishnaupadhyay4265 2 года назад +1

    Wah, kya mast samjhaya hai 👌👌

  • @gurmandeep4417
    @gurmandeep4417 2 года назад +2

    Best js teacher 👍👍

  • @ethanhunt4887
    @ethanhunt4887 2 года назад +1

    Very helpful video, I understand it one time - your explanation way is very easy and easy to understand.

  • @syedaashirali3385
    @syedaashirali3385 2 года назад +3

    Sir your way of explaining concepts is just amazing, thank you for sharing your experience and helping the newcomers. You are an inspiration for me.. God bless you

  • @JohnDoe-q2g7n
    @JohnDoe-q2g7n Год назад +1

    Great way of explanation💥💥

  • @Yash-ry5wj
    @Yash-ry5wj 2 года назад +1

    Understood Sir 🤩, You are Great🙌🏻❤️

  • @rajrai1495
    @rajrai1495 2 года назад +1

    I just had a interviuew where this question was asked just with two parameters, we could use apply for this case
    but if i had knowledge about your channel, i could have ace'd that interview

  • @souviksarkar4111
    @souviksarkar4111 2 года назад +1

    Mind blowing explanation . ❤

  • @scienceofcomputer5173
    @scienceofcomputer5173 Год назад

    sir thank u
    you explained it very well without leaving any detail

  • @Vikas-dm9uc
    @Vikas-dm9uc 2 года назад

    You are hidden treasure for me bhaiya❤

  • @hrithikrudra4292
    @hrithikrudra4292 2 года назад

    Understood bro
    Keep uploading such interview questions

  • @rahzofficial6880
    @rahzofficial6880 2 года назад

    Very humble , good and cool man.

  • @mdfaiyazulhussain8752
    @mdfaiyazulhussain8752 2 года назад

    Beautiful✨ Explanation, neat, clean code

  • @dipenchavda6988
    @dipenchavda6988 2 года назад

    Absoluty beautiful explanation.

  • @printmusic5m50
    @printmusic5m50 2 года назад +1

    Thank you very much Guru🙏🙏🙏🙏🙏🙏

  • @ManoharBatra
    @ManoharBatra 2 года назад +1

    sir ji aap shaandaar ho

  • @SonuSingh-qw2bs
    @SonuSingh-qw2bs Год назад

    Nice series 👌👌🙂🙂🙂🙂

  • @razarajpoot9811
    @razarajpoot9811 7 месяцев назад

    Wonderfull Explanation!!, Like and sub done for explanation.

  • @omkarshinde7466
    @omkarshinde7466 2 года назад +1

    Thank you so much broh ❤️

  • @ankushladani496
    @ankushladani496 2 года назад

    Maja aa gaya bhaiya....

  • @kewalkandpal
    @kewalkandpal 2 года назад

    Awesome 🔥🔥

  • @anilrajmeena4373
    @anilrajmeena4373 2 года назад +1

    Bhaiya ji next Should be on Important topic witch you have not covered yet.

  • @blackCoder305
    @blackCoder305 Год назад

    good explanations sir

  • @HamzaAli-hg6yg
    @HamzaAli-hg6yg 6 месяцев назад

    mja agya yr

  • @ninjatechstudio
    @ninjatechstudio 2 года назад +1

    excellent

  • @saurabrakshit405
    @saurabrakshit405 2 года назад

    Very nicely understood .
    but didn't got the same value like yours .

  • @gantavyasaraswat2130
    @gantavyasaraswat2130 10 месяцев назад

    GReat explanation bro

  • @vinodchand121
    @vinodchand121 2 года назад

    छोटे भाई क्या घुस कर बताता है। पता है तेरी खासियत क्या है एकदम जड़ से पकड़ कर जो समझाता है साला मुर्दा भी रॉकेट बन जाएगा।🙏🔥
    फायर है रे तू 👍

  • @zaidkazi3008
    @zaidkazi3008 2 года назад

    thank you so much bhaishab

  • @harrysaladfingers1515
    @harrysaladfingers1515 2 года назад +2

    ** I found this for non-primitive arguments after understanding the concept here **
    /* Receives a function which would be memoized*/
    function memoize(fn) {
    /* we'll use this object to store the results */
    let cache = {};
    /* Returns a function that will receive the arguments that will be passed to the memoized function (fn). */
    return (...args) => {
    /* We stringify the arguments in case they're non-primitive values */
    const cacheKey = JSON.stringify(args);
    /* were the arguments already passed? if no, then store the result */
    if (!(cacheKey in cache)) {
    cache[cacheKey] = fn(...args);
    }
    /* We then return the stored result */
    return cache[cacheKey];
    };
    }

  • @ashutoshasthana4494
    @ashutoshasthana4494 17 дней назад

    We can use map object to reduce coding perspective as well bro

  • @thakurjaswantsingh148
    @thakurjaswantsingh148 2 года назад

    hello ji
    I liked the way you explained things
    your next topic will be based on debouncing and throttling
    thank you

  • @krishnachotaliya7185
    @krishnachotaliya7185 Год назад

    Middleware per ek video banao na sir,🙏

  • @akshayvispute1281
    @akshayvispute1281 2 года назад

    Thank you sirji..✌✌

  • @arpitmaurya6677
    @arpitmaurya6677 2 года назад

    thanks bro , you made js easy

  • @rahulshukla4339
    @rahulshukla4339 2 года назад

    nice explain Thanks for this video

  • @madetolaugh3476
    @madetolaugh3476 2 года назад +5

    Sir pdf hai jis mein javascript ke interviews ke saare topic ho ?

  • @souvik5560
    @souvik5560 2 года назад

    Nice 👍🏼

  • @Its_me_Thor
    @Its_me_Thor Год назад

    great!

  • @tarunbharti1835
    @tarunbharti1835 Год назад

    bhaiya iss type ke javascript aur other technology like node express react mai video chaiye

  • @adityanautiyal2705
    @adityanautiyal2705 7 месяцев назад

    Hi. Is it necessary to use rest operator? It would work without it.

  • @terabappayush7908
    @terabappayush7908 2 года назад

    sir mujhe topic samaj aa gya at first mujhe ye bhi laga ki ok ho sakta hai ye kuch kam aa jaye with lots of data calculations or something. but the thing is ki maine ye same function without memoization ke bhi jab try kiya to result lagbhag same tha agar same function dubara call kiya to. so i dont know what is this function doing( i know its saving the values of output i get from my functions but time it takes to get the values are smilar to what i will get for not using it)

  • @HamzaAli-hg6yg
    @HamzaAli-hg6yg 6 месяцев назад

    level

  • @pankajsen8388
    @pankajsen8388 2 года назад

    @TechnicalSuneja sir aap konsi company me software engineer ho.

  • @sadhnasharnagat9120
    @sadhnasharnagat9120 2 года назад

    Pls make one video for service worker and web worker..

  • @gettingoverit__
    @gettingoverit__ Год назад

    currying memoisation closure lexical scope higher order function ye saare ek dusre se linked hai!

  • @rahulgheware5752
    @rahulgheware5752 Год назад

    It is just like dynamic Programming

  • @Devdaskekisse
    @Devdaskekisse 2 года назад +1

    KB tk aa jayega usemomo ka video sir

  • @aabhishakemishra
    @aabhishakemishra 2 года назад

    Please continue JS interview questions

  • @brandflipping6353
    @brandflipping6353 2 года назад

    How to do this with muliple arguments

  • @deepankmehta
    @deepankmehta 2 года назад

    Hi there, loved all your videos of this playlist. But I have an error I am not getting the same result as yours. My code is running always for the else case.
    Please help.

  • @mickeykutti5165
    @mickeykutti5165 2 года назад

    What do the words associative arrays , lookup table,cache hit/miss ratio have in common with memoization?

  • @nityaranjan6714
    @nityaranjan6714 Год назад

    let sum = 0;
    const addSum = (n) => {
    for (let i = 0; i < n; i++) {
    sum += n;
    }
    return sum;
    };
    const momoize = (addSum) => {
    let cache = {};
    return function (...args) {
    let n = args[0];
    if (n in cache) {
    console.log("from cache");
    console.log(cache);
    return cache[n];
    } else {
    console.log("calculating first time");
    console.log(cache);
    let result = addSum(n);
    cache[n] = result;
    return result;
    }
    };
    };
    console.time();
    const efficient = momoize(addSum);
    console.log(efficient(4));
    console.timeEnd();

  • @MuhammadSamiUllah2452
    @MuhammadSamiUllah2452 2 года назад

    Reason: zip END header not found
    Exception in thread "main" java.util.zip.ZipException: zip END header not found

  • @nityaranjan6714
    @nityaranjan6714 Год назад

    Is there any thing wrong in my code? Its executing else part every time. pasted the code below in comment.

  • @venven3353
    @venven3353 Год назад

    how to clear cache
    ex: efficient.clear()

  • @vinodraikwar5852
    @vinodraikwar5852 2 года назад

    Sir, how can i get your source code ?
    please answer me !

  • @kumarjitu5751
    @kumarjitu5751 Год назад +1

    thoda difficult laga yeh episode

  • @sagarchinchwade8351
    @sagarchinchwade8351 2 года назад

    value is not going to save in cache
    let addition=(n)=>{
    let sum=0;
    for(let i = 0; i {
    let caches={};
    console.log(caches)
    return function(...arg){
    let n= arg[0]
    if(n in caches){
    console.log('value is present is cache')
    return caches[n]

    }
    else{
    let result=fun(n);
    console.log('value is cache',result)
    result=caches[n]
    return result
    }
    }
    }
    const efficient=ExMemo(addition)
    (efficient(100))

  • @shashikantverma9931
    @shashikantverma9931 2 года назад

    Premium video

  • @dharmitkumarpatel2691
    @dharmitkumarpatel2691 2 года назад

    Please provide notes

  • @sushantyadav01
    @sushantyadav01 Год назад

    send the code

  • @naishedhdamor5875
    @naishedhdamor5875 9 месяцев назад

    kuch samaj nahi aaya🤦‍♂

  • @omkarshinde7466
    @omkarshinde7466 2 года назад +1

    Awesome 🔥❤️