Arrays - Data Structures and Algorithms in Javascript | Frontend DSA Interview Questions

  Рет қаралды 88,258

RoadsideCoder

RoadsideCoder

Күн бұрын

Пікірлер: 141
@RoadsideCoder
@RoadsideCoder Жыл бұрын
🔴 Get my Complete Frontend Interview Prep course - roadsidecoder.com/course-details ➡ Download my DSA with JS E-Book - topmate.io/roadsidecoder/491565 ✅ Follow me on Instagram to be updated about next videos - instagram.com/roadsidecoder/ If this video gets good response, I will make more DSA videos, so do share it with others 🔥
@PrajwalCoding
@PrajwalCoding 2 ай бұрын
what is the time complexities of these functions 🫨🫨 🫨🫨 🫨🫨 🫨🫨
@shivamkumar-zz1kp
@shivamkumar-zz1kp Жыл бұрын
please please please dont quit this course....please keep uploading
@Android-17
@Android-17 Жыл бұрын
Excellent session! Looking forward to the whole series. Also, #FreeAlgoAgarwal 🚩
@dreamvallyhasan4807
@dreamvallyhasan4807 Ай бұрын
The best mentor of Frontend development....💞💓💗💕❤💝
@RoadsideCoder
@RoadsideCoder Ай бұрын
❣️❣️
@purusharma8192
@purusharma8192 Жыл бұрын
Wow,ab to video aur acchi hoti ja rahi hai day by day
@ThelookAt
@ThelookAt Жыл бұрын
Khatrnak bhaii.. All array clear in one video my frnd also thx me for your video🎉❤
@rakibhassan3575
@rakibhassan3575 Жыл бұрын
can anyone explain if secondLargest ([2, 3, 44, 5, 44, 3, 7, 8, 11]) in the arr the optimised code will give 44 as second largest During the fifth iteration, the value of arr[i] is 44, which is equal to the current value of largest. Therefore, the else if condition is true, and the value of secLar is updated to the current value of largest, which is 44. The value of largest remains 44. During the sixth iteration, the value of arr[i] is 3, which is smaller than largest. The else if condition is also false, so nothing happens. During the seventh iteration, the value of arr[i] is 7, which is smaller than largest. The else if condition is also false, so nothing happens. During the eighth iteration, the value of arr[i] is 8, which is smaller than largest. The else if condition is also false, so nothing happens. In the ninth iteration, the largest value is 44 (which was updated during the eighth iteration), and the current value of arr[i] is 11, which is smaller than both the current largest and second-largest values. Therefore, there are no updates made to the values of largest or secLar during this iteration.
@shagunjaiswal3403
@shagunjaiswal3403 10 күн бұрын
My favourite mentor Roadside coder, i always suggest his videos to everybody
@RoadsideCoder
@RoadsideCoder 10 күн бұрын
❤️
@chinmaay
@chinmaay 5 ай бұрын
size > k || size < k should also be there in case, size < k 49:50
@saimimtiaz5516
@saimimtiaz5516 4 ай бұрын
yes it should be if (k>size) not (size>k)
@VarunKapoor-tc1je
@VarunKapoor-tc1je Жыл бұрын
thanks bro . we really needed quality dsa guidance in Javascript
@shubhamsharaff6358
@shubhamsharaff6358 Жыл бұрын
Hats off to you man ❤ , the way you're explaining is so simple to understand any methods in this array video
@RoadsideCoder
@RoadsideCoder Жыл бұрын
Thanks a ton
@tpadma7419
@tpadma7419 9 ай бұрын
I have purchased DSA JS e-Book, really helpful...direct links to leetcode....thank you for preparing eBook.....
@RoadsideCoder
@RoadsideCoder 9 ай бұрын
Awesome, thank you!
@KrishnaChaitanya-x5b
@KrishnaChaitanya-x5b 7 ай бұрын
✨Nice Explaintion of the and logic its very helpful plz do such videos thank you fpr knowledge✨
@RoadsideCoder
@RoadsideCoder 7 ай бұрын
Most welcome 😊
@abhishekkumar-ot4zo
@abhishekkumar-ot4zo Күн бұрын
31:06 second largest element of the array [ 12,36,1,10,34,1,35] -> make two variable last second last , compare the last if it is greater then compare it with second last if greater smaller update ... for me
@dipalikumari7777
@dipalikumari7777 Жыл бұрын
best video..please continue this great work
@RoadsideCoder
@RoadsideCoder Жыл бұрын
Thanks ❤️🙏
@gauravdhenge6328
@gauravdhenge6328 Жыл бұрын
Thank you so much brother your all videos are very needful...!!!
@RoadsideCoder
@RoadsideCoder Жыл бұрын
Most welcome!
@avinashgardasalgonquin4371
@avinashgardasalgonquin4371 Жыл бұрын
Bro, thanks a lot for making this video. I've been waiting to watch a tutorial that covers most of the functions with arrays.
@padmatalla9371
@padmatalla9371 9 ай бұрын
So indepth and crystal clear explanation....🎉
@RoadsideCoder
@RoadsideCoder 9 ай бұрын
You can check my complete course for more - roadsidecoder.com/course-details
@padmatalla9371
@padmatalla9371 9 ай бұрын
@@RoadsideCoder purchased complete course
@padmatalla9371
@padmatalla9371 9 ай бұрын
@@RoadsideCoder really helpfull interview guide to crack interviews
@ajitpatil7214
@ajitpatil7214 Жыл бұрын
Thumbnail is very good 🔥 and also the concepts are well explained in organised manner. Problems on those concepts make more understanding.
@RoadsideCoder
@RoadsideCoder Жыл бұрын
🙏❤️
@crazyvaleideas
@crazyvaleideas Жыл бұрын
Very knowledgable content , almost all my approaches are similar to yours !! ❤😎
@wizzy4240
@wizzy4240 11 ай бұрын
Moving forward from that joke was a better decision than anything else
@Arifhossain-fk3ub
@Arifhossain-fk3ub Жыл бұрын
eagerly waiting for next videos
@lucaliebenberg7565
@lucaliebenberg7565 Жыл бұрын
Great content, would be awesome if you could upload more and continue with DSA's (going into string manipulation and potentially some common toy problems in JS!) 🙏👑 #FreeAlgoAgarwal
@rakibhassan3575
@rakibhassan3575 Жыл бұрын
can anyone explain if secondLargest ([2, 3, 44, 5, 44, 3, 7, 8, 11]) in the arr the optimised code will give 44 as second largest During the fifth iteration, the value of arr[i] is 44, which is equal to the current value of largest. Therefore, the else if condition is true, and the value of secLar is updated to the current value of largest, which is 44. The value of largest remains 44. During the sixth iteration, the value of arr[i] is 3, which is smaller than largest. The else if condition is also false, so nothing happens. During the seventh iteration, the value of arr[i] is 7, which is smaller than largest. The else if condition is also false, so nothing happens. During the eighth iteration, the value of arr[i] is 8, which is smaller than largest. The else if condition is also false, so nothing happens. In the ninth iteration, the largest value is 44 (which was updated during the eighth iteration), and the current value of arr[i] is 11, which is smaller than both the current largest and second-largest values. Therefore, there are no updates made to the values of largest or secLar during this iteration.
@BharathKumar-iq7ku
@BharathKumar-iq7ku Жыл бұрын
Thanks buddy appreciate it.. Keep doing the good work!!! ❤✨
@syed-muhammad-ali-raza
@syed-muhammad-ali-raza 3 ай бұрын
1:05:44 why we are not using sets here for unique if we remove duplicate value from array
@okkk-gt8tb
@okkk-gt8tb 3 ай бұрын
same question
@haribalajeek8743
@haribalajeek8743 16 күн бұрын
Sets would create a new way to store them , but modifying inside itself will make the code more optimized
@Prashant-z1n
@Prashant-z1n 16 күн бұрын
editing is really entertaining😂😂😂😂😂
@harikrishnanpandyan5684
@harikrishnanpandyan5684 Жыл бұрын
More same like this video please.,.. 🔥🔥🔥🔥🔥🔥
@damandeepsingh4186
@damandeepsingh4186 5 ай бұрын
// Ques 2 - Rotate Array by K // Given an integer array nums, rotate the array to the right by k steps, // where k is non - negative. // Input: nums = [1,2,3,4,5,6,71, k = 3 // Input: nums = (-1, -100,3,99], k = 2Output: [5,6,7,1,2,3,4]Output: [3,99,-1, -100] solution : function rotateIT(nums, a) { for (let i = 0; i < a; i++) { nums.unshift(nums.pop()); } return nums; } let num1 = [1, 2, 3, 4, 5, 6, 7] let num2 = [-1, -22, 33, 4 - 2] console.log(rotateIT(num1, 3));
@TehAutumnCore
@TehAutumnCore 4 ай бұрын
My solution was similar to yours: function rotateArray(nums,k) { for(i = 0; i < k;i++) { nums.unshift(nums.pop()) } return nums } console.log(rotateArray([1,2,3,4,5,6,7], 3))
@ravanabuddha3955
@ravanabuddha3955 5 ай бұрын
How did you calculate the time complexity of splice method to be O(1) at 1:03:15? In my opinion it should be O(n) since it has to modify the whole array.
@padmatalla9371
@padmatalla9371 9 ай бұрын
Please please make more such videos.....🙏🙏🙏🙏
@tharaks552
@tharaks552 4 ай бұрын
love your videos thanks dude
@vilexd6713
@vilexd6713 2 ай бұрын
let arr=[2,4,5,2,6,7,9,2,1] const duplicate=()=>{ let uni= Array.from(new Set(arr)) console.log(uni); return uni.length; } console.log(duplicate(arr)); sir we can use this method also ? for remove duplicate 1:00:00
@midunc5317
@midunc5317 Жыл бұрын
Why are we giving size-k,size in splice ? 49:47 we can give size-k,k right?
@TufailAkram-pe5fm
@TufailAkram-pe5fm Жыл бұрын
Brother please upload further, your videos are very helpful and we'll explained.
@rakibhassan3575
@rakibhassan3575 Жыл бұрын
can anyone explain if secondLargest ([2, 3, 44, 5, 44, 3, 7, 8, 11]) in the arr the optimised code will give 44 as second largest During the fifth iteration, the value of arr[i] is 44, which is equal to the current value of largest. Therefore, the else if condition is true, and the value of secLar is updated to the current value of largest, which is 44. The value of largest remains 44. During the sixth iteration, the value of arr[i] is 3, which is smaller than largest. The else if condition is also false, so nothing happens. During the seventh iteration, the value of arr[i] is 7, which is smaller than largest. The else if condition is also false, so nothing happens. During the eighth iteration, the value of arr[i] is 8, which is smaller than largest. The else if condition is also false, so nothing happens. In the ninth iteration, the largest value is 44 (which was updated during the eighth iteration), and the current value of arr[i] is 11, which is smaller than both the current largest and second-largest values. Therefore, there are no updates made to the values of largest or secLar during this iteration.
@investigat0r00
@investigat0r00 Жыл бұрын
Thankyou very much ❣
@parassharma7041
@parassharma7041 Жыл бұрын
Best video❤
@saifhamdare72
@saifhamdare72 2 ай бұрын
you should have covered the unsorted array situation in this video.but still i liked the theory and demo which you taught us thank you.
@SoorajJose1
@SoorajJose1 Жыл бұрын
46:22 how the length of array become 8 ,as you mentioned in video arr = [1,2,3,4,5,6,7] . it is 7 ryt ?
@krishnat9767
@krishnat9767 Жыл бұрын
Also the index count should start from zero instead of one
@VimalKumar-cc2ri
@VimalKumar-cc2ri Жыл бұрын
​@@krishnat9767the it should be 6 right?
@VishalSanap-qj4zn
@VishalSanap-qj4zn 10 ай бұрын
Length of an array is the no. of elements and indexes start from 0. so length should be 7 and no of indexes should be 6 - [0,1,2,3,4,5,6]
@guptasagar694
@guptasagar694 6 ай бұрын
Yehi toh...Galat bataya usne solution 1 and optimised raw wala bhi...Yaar isko zyada knowledge nahi he...
@VivekYadav-sv7nj
@VivekYadav-sv7nj 9 ай бұрын
In your last question 's first method how array.splice() can have constant time complexity as splice() itself is of linear time complexity ?
@sanvijha
@sanvijha Жыл бұрын
Great explained thank you
@kedarkulkarni0074
@kedarkulkarni0074 Жыл бұрын
Please make strings problems they really help in interview as well as general coding
@RoadsideCoder
@RoadsideCoder Жыл бұрын
Yes, I will!
@shivamgoyal796
@shivamgoyal796 Жыл бұрын
is JS will not work for Faang Companies as small community and and not so much resources available or i continue JS with DS.
@RoadsideCoder
@RoadsideCoder Жыл бұрын
For FAANG companies, comtinue JS with DSA
@shivamgoyal796
@shivamgoyal796 Жыл бұрын
@@RoadsideCoder thanks keep posting video on DSA more and more 😄
@ShubhamKumar-dc9tu
@ShubhamKumar-dc9tu Жыл бұрын
Plzz Bhaiya add more videos and String question video 🙏🙏
@moses3544
@moses3544 Жыл бұрын
I have a MERN app with Frontend and Backend, I am having trouble with Axios when I deployed the app to Amazon Web Service (EC2). Have you encountered this with Axios?
@KishanKumar-vl9dr
@KishanKumar-vl9dr Жыл бұрын
// More efficiennt solution for second max. let arr=[10,0,90]; function secondMax(arr){ let max= arr[0]; let secondMax = -Infinity; for(let i=1; i max){ secondMax = max; max = arr[i]; }else if(arr[i] >secondMax && arr[i] < max) { secondMax = arr[i]; } } return secondMax; } console.log(secondMax(arr));
@ask8573
@ask8573 Жыл бұрын
Array in JS is different from core Data structures Array, in js array is a special object.
@kinder-krish
@kinder-krish Жыл бұрын
Bro , last vedio which is Remove duplicate form array ,last program output for length giving crt answer...if u print sorted array it is giving a wrong output
@mehr4294
@mehr4294 Жыл бұрын
Can we have problem solving based on dsa
@anurag.rathore31
@anurag.rathore31 Жыл бұрын
👇More optimised code 👇 function secondLar(arr) { let max= Number.NEGATIVE_INFINITY; let secondMax=Number.NEGATIVE_INFINITY; for(let i=0; i max){ secondMax=max; max= arr[i]; } } return secondMax; }
@anurag.rathore31
@anurag.rathore31 Жыл бұрын
No need of else if condition
@raiga98
@raiga98 Жыл бұрын
This isn't correct. What if you had array of the following: [4,7,6,5,2 1]. The second largest would be 6, but this code would return 4. That's why the second if statement is needed. In his first if statement however, he should've set secondLargest before updating the largest though because doing it the way he did it will cause both variables to store the dame value.
@anurag.rathore31
@anurag.rathore31 Жыл бұрын
@@raiga98 yes, that's for an edge case.
@watchtube9429
@watchtube9429 Жыл бұрын
ok bro but please upload the full course we are waiting
@DeepakKumar-fz3es
@DeepakKumar-fz3es 4 ай бұрын
not getting how the length of nums array in rotate array by k problem is 8, i mean arr=[1,2,3,4,5,6,7], here the length of array is 7 right ? not 8
@nicet7330
@nicet7330 Жыл бұрын
Bro love you ❤❤.
@mohd.furqanali9064
@mohd.furqanali9064 Жыл бұрын
Bring Strong questions as well
@aaryanpinto9276
@aaryanpinto9276 Жыл бұрын
Hi brother I'm going to start your Chat application playlist. The Application is just God level. But if I download the versions which you have installed and start developing will everything work fine. Tell me if I'm good to go
@RoadsideCoder
@RoadsideCoder Жыл бұрын
Yes it will work fine!
@aaryanpinto9276
@aaryanpinto9276 Жыл бұрын
@@RoadsideCoder OK word!! Starting it today itself
@jadeyu4367
@jadeyu4367 Жыл бұрын
Can you make more of this kind of videos? Array , object exercises
@RoadsideCoder
@RoadsideCoder Жыл бұрын
already have, you can check on my channel
@charankumarbasam5866
@charankumarbasam5866 Жыл бұрын
function Rotation( arrayRot, k){ return arrayRot= [...arrayRot.slice(arrayRot.length-k,arrayRot.length),...arrayRot.slice(0,arrayRot.length-k)] }
@MEGHU2317
@MEGHU2317 9 ай бұрын
Can you please also add multidimensional array compare, iterate
@tarundurbha5398
@tarundurbha5398 Жыл бұрын
Bro please do this DSA series for string and object as well plz bro 😀
@Abhi1793
@Abhi1793 8 ай бұрын
brother can we use this instead of that whole big code function check (arr){ return arr.sort((a,b)=> b-a)[1] } console.log(check([1,2,3,1]))
@RoadsideCoder
@RoadsideCoder 8 ай бұрын
not allowed in interviews
@Abhi1793
@Abhi1793 8 ай бұрын
@@RoadsideCoder but if i apply in a company where they want javascript and they are paying 25 k a month then it’s applicable?
@SUVADEEPMAITY
@SUVADEEPMAITY Жыл бұрын
Next video on objects please 🥺🙏
@RoadsideCoder
@RoadsideCoder Жыл бұрын
Already made - kzbin.info/www/bejne/jp-peotpmJyrpas
@SUVADEEPMAITY
@SUVADEEPMAITY Жыл бұрын
@@RoadsideCoder oh great.. Is it covering all the topics? And thank you so much for all these videos
@KevinGonzalez-xj4ur
@KevinGonzalez-xj4ur Жыл бұрын
because it popped its back?
@shivambln
@shivambln 4 ай бұрын
Concat va spread ?? Whats the difference?
@TechTasticTV1
@TechTasticTV1 Ай бұрын
i think both work similarly, so the choice is often a matter of preference, readability, or specific use cases
@A9kit.k
@A9kit.k Жыл бұрын
Piyush brother, please make videos on linked list also
@rakibhassan3575
@rakibhassan3575 Жыл бұрын
can anyone explain if secondLargest ([2, 3, 44, 5, 44, 3, 7, 8, 11]) in the arr the optimised code will give 44 as second largest During the fifth iteration, the value of arr[i] is 44, which is equal to the current value of largest. Therefore, the else if condition is true, and the value of secLar is updated to the current value of largest, which is 44. The value of largest remains 44. During the sixth iteration, the value of arr[i] is 3, which is smaller than largest. The else if condition is also false, so nothing happens. During the seventh iteration, the value of arr[i] is 7, which is smaller than largest. The else if condition is also false, so nothing happens. During the eighth iteration, the value of arr[i] is 8, which is smaller than largest. The else if condition is also false, so nothing happens. In the ninth iteration, the largest value is 44 (which was updated during the eighth iteration), and the current value of arr[i] is 11, which is smaller than both the current largest and second-largest values. Therefore, there are no updates made to the values of largest or secLar during this iteration.
@tusharutane8031
@tusharutane8031 Жыл бұрын
Bhaiya, please late dal rhe ho chalega but finish kar dena bhot courses pade hai Jo kabhi complete he nhi hue 🫠hats off to work you did till now🤩
@RoadsideCoder
@RoadsideCoder Жыл бұрын
I promise to bring you all the most high quality DSA with JS content on youtube. Plus this video will be 1 hour+ so even if its late, I will cover most things in one video, so u all get maximum value!
@tarundurbha5398
@tarundurbha5398 Жыл бұрын
Bro plz do this DSA series for objects and strings plzz😢
@aaryanpinto9276
@aaryanpinto9276 Жыл бұрын
Hi Sir I am building your Chat application but I have seen that people are having issues with deployment. Can you create a video on just the deployment part or suggest me an alternative
@rakibhassan3575
@rakibhassan3575 Жыл бұрын
can anyone explain if secondLargest ([2, 3, 44, 5, 44, 3, 7, 8, 11]) in the arr the optimised code will give 44 as second largest During the fifth iteration, the value of arr[i] is 44, which is equal to the current value of largest. Therefore, the else if condition is true, and the value of secLar is updated to the current value of largest, which is 44. The value of largest remains 44. During the sixth iteration, the value of arr[i] is 3, which is smaller than largest. The else if condition is also false, so nothing happens. During the seventh iteration, the value of arr[i] is 7, which is smaller than largest. The else if condition is also false, so nothing happens. During the eighth iteration, the value of arr[i] is 8, which is smaller than largest. The else if condition is also false, so nothing happens. In the ninth iteration, the largest value is 44 (which was updated during the eighth iteration), and the current value of arr[i] is 11, which is smaller than both the current largest and second-largest values. Therefore, there are no updates made to the values of largest or secLar during this iteration.
@ayushmann5897
@ayushmann5897 Жыл бұрын
bro if possible ,please increase your upload frequency, :)
@hotlyf8609
@hotlyf8609 Жыл бұрын
Hey Piyush, can you please make a video on how we can send file to that chat application like image, pdf and zip file and the message seen this will add more value to that application.
@rakibhassan3575
@rakibhassan3575 Жыл бұрын
can anyone explain if secondLargest ([2, 3, 44, 5, 44, 3, 7, 8, 11]) in the arr the optimised code will give 44 as second largest During the fifth iteration, the value of arr[i] is 44, which is equal to the current value of largest. Therefore, the else if condition is true, and the value of secLar is updated to the current value of largest, which is 44. The value of largest remains 44. During the sixth iteration, the value of arr[i] is 3, which is smaller than largest. The else if condition is also false, so nothing happens. During the seventh iteration, the value of arr[i] is 7, which is smaller than largest. The else if condition is also false, so nothing happens. During the eighth iteration, the value of arr[i] is 8, which is smaller than largest. The else if condition is also false, so nothing happens. In the ninth iteration, the largest value is 44 (which was updated during the eighth iteration), and the current value of arr[i] is 11, which is smaller than both the current largest and second-largest values. Therefore, there are no updates made to the values of largest or secLar during this iteration.
@ayushtiwari9343
@ayushtiwari9343 Жыл бұрын
In your 2'nd problem your approach is not working if the k is >= 2*array.length please check if it's okay or not
@purusharma8192
@purusharma8192 Жыл бұрын
Waiting
@rishiraj2548
@rishiraj2548 Жыл бұрын
Good day greetings
@damandeepsingh4186
@damandeepsingh4186 5 ай бұрын
//Ques 1 - Second Largest Number // Given an array Arr of size N, print second largest // distinct element from an array. // Input: [12, 35, 1, 10, 34, 1] // Input: [10, 5, 10] ->>›››Output: 34 Output: 5 let aa = [12, 35, 11, 10, 34, 1] let q = [10, 5, 10] let UNiq = q.filter((value, index, self) => self.indexOf(value) === index) let bb = aa.sort((a, b) => a - b) let c = bb[bb.length - 2] let DD = UNiq.sort((a, b) => a - b) let d = DD[DD.length - 2] console.log(c) console.log(d)
@damandeepsingh4186
@damandeepsingh4186 5 ай бұрын
//with function let aa = [12, 35, 11, 10, 34, 35, 1] let q = [10, 5, 10] function sortIng(arr) { let uniquearr = arr.filter((value, index, self) => self.indexOf(value) === index) uniquearr.sort((a, b) => a - b); if (uniquearr.length < 2) { return null; } return uniquearr[uniquearr.length - 2]; } let bbb = sortIng(aa); let bbb2 = sortIng(q); console.log(bbb); console.log(bbb2);
@rakibhassan3575
@rakibhassan3575 Жыл бұрын
can anyone explain if secondLargest ([2, 3, 44, 5, 44, 3, 7, 8, 11]) in the arr the optimised code will give 44 as second largest During the fifth iteration, the value of arr[i] is 44, which is equal to the current value of largest. Therefore, the else if condition is true, and the value of secLar is updated to the current value of largest, which is 44. The value of largest remains 44. During the sixth iteration, the value of arr[i] is 3, which is smaller than largest. The else if condition is also false, so nothing happens. During the seventh iteration, the value of arr[i] is 7, which is smaller than largest. The else if condition is also false, so nothing happens. During the eighth iteration, the value of arr[i] is 8, which is smaller than largest. The else if condition is also false, so nothing happens. In the ninth iteration, the largest value is 44 (which was updated during the eighth iteration), and the current value of arr[i] is 11, which is smaller than both the current largest and second-largest values. Therefore, there are no updates made to the values of largest or secLar during this iteration.
@salmanfisal9446
@salmanfisal9446 Жыл бұрын
you have wrongly understood the problem in the if else(arr[i] !== firstlargest ) which means in the third index the 44 is overwritten by the immediate value of an array and those the immediate value we will compare with the arr[i] thats the reason we provided else if(arr[i] !==firstlargest ) i think you forget to enter "!" operator in the edge case statement
@VinitVinit-ts5nh
@VinitVinit-ts5nh Жыл бұрын
Bhai please course ko complete karna
@santoshmore2953
@santoshmore2953 Жыл бұрын
bro next video on strings
@sumanthprabhu11
@sumanthprabhu11 Жыл бұрын
un-optimized solutions are the easiest to understand
@rakibhassan3575
@rakibhassan3575 Жыл бұрын
can anyone explain if secondLargest ([2, 3, 44, 5, 44, 3, 7, 8, 11]) in the arr the optimised code will give 44 as second largest During the fifth iteration, the value of arr[i] is 44, which is equal to the current value of largest. Therefore, the else if condition is true, and the value of secLar is updated to the current value of largest, which is 44. The value of largest remains 44. During the sixth iteration, the value of arr[i] is 3, which is smaller than largest. The else if condition is also false, so nothing happens. During the seventh iteration, the value of arr[i] is 7, which is smaller than largest. The else if condition is also false, so nothing happens. During the eighth iteration, the value of arr[i] is 8, which is smaller than largest. The else if condition is also false, so nothing happens. In the ninth iteration, the largest value is 44 (which was updated during the eighth iteration), and the current value of arr[i] is 11, which is smaller than both the current largest and second-largest values. Therefore, there are no updates made to the values of largest or secLar during this iteration.
@funtrap2289
@funtrap2289 Жыл бұрын
Many ytubers started DSA playlists but no one complete all topics Because they got subscribers so they will start collaboration vedio😢
@RoadsideCoder
@RoadsideCoder Жыл бұрын
Don't worry, I will complete it fully!
@awais_ansarii
@awais_ansarii Жыл бұрын
@premsingh6967
@premsingh6967 Жыл бұрын
@tpadma7419
@tpadma7419 9 ай бұрын
ya javascript got tired of doing Push'up'
@vishnusingh2300
@vishnusingh2300 Жыл бұрын
29:00
@parassingh9723
@parassingh9723 Жыл бұрын
🙏
@vishnusingh2300
@vishnusingh2300 Жыл бұрын
45:34
@veeranjinivemala
@veeranjinivemala Күн бұрын
Bro I have an issue how u remember all these things☠️☠️
@saikatbishal8429
@saikatbishal8429 Жыл бұрын
Lame joke but great video.
@CS_HimanshuVishwakarma
@CS_HimanshuVishwakarma Жыл бұрын
This playlist is not for beginners
@SCRIPTSAG
@SCRIPTSAG Жыл бұрын
Why you gyus just make a video without board and pen 🖊️ with I think I need to creat a video beacuse of awo kuch bhi bna do Bina ache se samghye
@RoadsideCoder
@RoadsideCoder Жыл бұрын
Ok from next video I will use it!
@joshuaajagbe5096
@joshuaajagbe5096 Жыл бұрын
Hi guys
@RoadsideCoder
@RoadsideCoder Жыл бұрын
Heyy!
@VinitVinit-ts5nh
@VinitVinit-ts5nh Жыл бұрын
Bhai please course ko complete karna
Непосредственно Каха: сумка
0:53
К-Media
Рет қаралды 12 МЛН
-5+3은 뭔가요? 📚 #shorts
0:19
5 분 Tricks
Рет қаралды 13 МЛН
🎈🎈🎈😲 #tiktok #shorts
0:28
Byungari 병아리언니
Рет қаралды 4,5 МЛН
JavaScript Array Mastery: Tips, Tricks & Best Practices
1:02:49
Envato Tuts+
Рет қаралды 29 М.
2.5 Years Experienced Best JavaScript Interview
2:03:06
Anurag Singh ProCodrr
Рет қаралды 344 М.
Top 50 Most Asked JavaScript Logical Interview Questions || Must Watch🤯😱
1:09:02
Fastest way to learn Data Structures and Algorithms
8:42
Sahil & Sarra
Рет қаралды 303 М.
Top 10 Javascript Algorithms to Prepare for Coding Interviews
1:52:53
freeCodeCamp.org
Рет қаралды 83 М.
10 JavaScript Interview Questions You HAVE TO KNOW
13:41
James Q Quick
Рет қаралды 78 М.
CppCon 2014: Mike Acton "Data-Oriented Design and C++"
1:27:46
Непосредственно Каха: сумка
0:53
К-Media
Рет қаралды 12 МЛН