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

  • @arunmohanpk334
    @arunmohanpk334 10 часов назад

    when we are using async await, it wont run first 3 tasks concurrently. It is synchronous. So it is still executing one by one tasks from queue. When the third task completes it takes t4 from the queue. Technically, it is not running concurrently. Please clarify

  • @HK-er7wf
    @HK-er7wf 3 дня назад

    Explanation for having 2 valid outputs --
    Both task 4 and 5 get resumed after their "wait" promises get resolved/fulfilled. The setTimeout function could resolve task4's promise some ms later than the actual delay due to some sync tasks and therefore task5 could be resumed earlier
    Is there anything else to dig deeper here ?

  • @DemystifyFrontend
    @DemystifyFrontend 3 дня назад

    Good one

  • @Aviralsingh-yw7xx
    @Aviralsingh-yw7xx 3 дня назад

    Really helpful

  • @luxurymusic1051
    @luxurymusic1051 3 дня назад

    explain the follow up answer

    • @DevtoolsTech
      @DevtoolsTech 3 дня назад

      You tell me what is the possible answer!?

  • @sushmitgaur8537
    @sushmitgaur8537 2 дня назад

    nobody can come up with such solutions in 15-20 min of interview. these questions are senseless for interviews. such questions require lot of thought process.

    • @DevtoolsTech
      @DevtoolsTech 2 дня назад

      It is a very simple question. If you don't go prepared in an interview then you won't be able to solve basic addition too. You can't solve any exam without preparation.

    • @SushmitGaur
      @SushmitGaur 2 дня назад

      You can only do such questions if you have faced them before and done it before. But if you throw such question in someone's fave for the first time it's impossible to come up with solution in an hour. Ppl prepare basics even afvanced stuff but not specific problem . Even if you have very good knowledge of promises you still can't solve it in an hour if you are given this question for the first time that's why it's unfair to judge on this basis.

    • @DevtoolsTech
      @DevtoolsTech 2 дня назад

      Such companies pay 50-60+ lpa for frontend roles. One can expect such pay with basic preparation and knowledge. Idea of preparation to solve enough questions that you develop a rough framework to solve unknown problem statements. It is same for all interviews and exams, be it leetcode or one's chemistry exam. You can't prepare all questions but enough to develop topic identification, deep understanding of the topic, and come up with a brute force solution. It is not that tough of a question. A good chunk of candidates can solve this.

    • @sushmitgaur8537
      @sushmitgaur8537 2 дня назад

      @@DevtoolsTech nope@ it's very advanced. and again no one can solve it in an hour of interview.

    • @DevtoolsTech
      @DevtoolsTech 2 дня назад

      May be for you it is advanced and it is okay. For me, many questions are advanced. It really depends upon one's level of preparation, practice, and exposure. Please do share some examples of questions that you feel are more apt. I will cover them too and it will help everyone. Thank you!