Solving Paytm and Uber Frontend Interview Question | Custom Map with Limit

preview_player
Показать описание
In this video, we will solve a front-end interview question from top companies like Paytm and Uber. We will build a custom map function that can make atmost n calls at any given time. We will talk about different approaches and chose the most simple yet effective way of solving the problem statement. We will learn recursion, looping, closures, and more.

Try now using the links below

You can support our channel via:

************************************************************
Devtools Tech is a YouTube channel started as a collaborative effort among like-minded engineers to provide high-quality programming tutorials for free. We firmly believe in knowledge sharing and easy access to quality content for everyone. Hence, this channel is an effort to give back to the community and a step toward our belief -- "We rise by lifting others".

Team Members:
Yomesh Gupta

#javascript #ai #web #frontend #interviewquestions #devtoolstech #code #programming #developement #devtoolstech #code
***********************************************************
Рекомендации по теме
Комментарии
Автор

This video felt rushed. Question and the approaches were never discussed thoroughly before jumping into the solution.

The solution however obvious it might be to you, from the 3rd person, the complete 11 mins were a waste of time to us.

MASTERISHABH
Автор

Hey! I do agree with the other comment and felt like something was missing or rush. Another thing I noticed is that the question is hinting at using async methods (likely Promise.SettleAll) but what you've implemented is very synchronous

syncmaster
Автор

Hey yomesh,
Thanks for sharing the solution, I have two doubts:
1. What if I use call instead of bind, what is the purpose of bind here.
2. What will happen if iteratee is an async function.

saquibakhter
Автор

Thank you so much for your efforts bro!

SAMEERKHAN-ndti
Автор

This solution seems wrong. Suppose you have a 3rd id with a very long request time. so 1 and 2 goes into postCompletionCallback . 1st timeout is completed and iterateeFn is called with 3 having long request time meanwhile 2nd timeout is completed and iterateeFn is called with 4 which has a short request time so obviosuly that will be completed first and User4 will be pushed which will call iterateeFn with 5 and its timeout will complete faster than 3rd timeout pushing User5 into outputs and at last after 3rd timeout is completed User3 will be pushed therefore making the solution wrong. If you want to confirm this, make random time multiplied by 1000 not by 100.

vaibhavmishra