RLRajan Lagahinrajanlagah.hashnode.devยทSep 3, 2023 ยท 1 min readJavascript Array.filterWe will discuss Polyfill for Array.filter(). About The Javascript filter takes a function as a parameter and returns a new array with items that satisfy the given function .i.e return true when the item is passed to a given function. const arr = [0,2...00
RLRajan Lagahinrajanlagah.hashnode.devยทSep 3, 2023 ยท 2 min readJavascript Array.flatWe will discuss Polyfill for Array.flat(). About Array.flat is a function that will take depth as a parameter and return new array of concatenated arrays till depth. const array = [1,3,4,5,[2,3,4,[5,67]], [1,2,3]] console.log(array.flat()) // [ 1, 3,...00
RLRajan Lagahinrajanlagah.hashnode.devยทAug 28, 2023 ยท 4 min readYoutube system designRequirements Design a system where the user can upload video can watch videos will see a live feed on the landing page Load calculations Assumptions Total number of users watching videos per day 200M Total number of users uploading videos per ...00
RLRajan Lagahinrajanlagah.hashnode.devยทAug 18, 2023 ยท 2 min readBest Time to Buy and Sell Stock #121Check the problem statement on leetcode Intuition You can not sell first and buy later. So it will remove all the cases where you need to check the difference from previous values You only have to make 1 trade You only need to find the difference ...00
RLRajan Lagahinrajanlagah.hashnode.devยทAug 17, 2023 ยท 2 min read"Proxy" a way to optimize your codeUsing proxy you can intercept the fundamental functions for objects. Ever wanted to add an event listener or callback whenever a specific function or value from an object is called? Maybe you are doing recursion and want to check how many times the ...00