Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,201,291 members, 7,977,898 topics. Date: Thursday, 17 October 2024 at 03:16 PM |
Nairaland Forum / Science/Technology / Programming / Help With Javascript Merge Sort (651 Views)
July Bootcamp Training - Full Stack Web Development With Javascript (mern Stack) / Tarot Website I Cooked With JavaScript,HTML / Mobile Technology: Lets Build A Mobile App With Javascript (2) (3) (4)
Help With Javascript Merge Sort by efelico: 4:02am On May 06, 2022 |
Please someone should help me explain how line 29-32 works. I don't understand how the recursive call is working
|
Re: Help With Javascript Merge Sort by Nobody: 8:04am On May 06, 2022 |
Hello The arrow function mergesort is useless in the code ,except if it's being called in another line which isn't showing in the posted screenshot. A recursive function calls itself until it can't i.e if the condition set is true for all values ,the algorithm for the recursive function act like a while loop and runs till your CPU got f*cked up,meaning that it'll run indefinitely. Even the arrow function mergesort won't even do something close to what it names implies, it's sorting and merging nothing at all but slicing it which won't show in the output 1 Like |
Re: Help With Javascript Merge Sort by kuljoe4: 10:17pm On May 07, 2022 |
Lol merge sort nothing forever |
Re: Help With Javascript Merge Sort by thanksjosh005: 11:58pm On May 07, 2022 |
Here's a reference to save you: https://www.w3resource.com/javascript-exercises/searching-and-sorting-algorithm/searching-and-sorting-algorithm-exercise-2.php |
Re: Help With Javascript Merge Sort by IhateRetards: 4:35pm On May 09, 2022 |
Hey am a learner like you but take this might help you. Cheers. Continue with the second Function under the first function to complete the code
|
Re: Help With Javascript Merge Sort by Laryfrosh: 7:38pm On May 09, 2022 |
IhateRetards: Please is this normal JavaScript or DSAs |
Re: Help With Javascript Merge Sort by IhateRetards: 9:06pm On May 09, 2022 |
Laryfrosh: Yeah JavaScript DSA |
Re: Help With Javascript Merge Sort by Nobody: 9:15pm On May 09, 2022 |
IhateRetards:What book is this pls? |
Re: Help With Javascript Merge Sort by Laryfrosh: 9:37pm On May 09, 2022 |
IhateRetards: I for sey o |
Re: Help With Javascript Merge Sort by IhateRetards: 10:10pm On May 09, 2022 |
Rgade:
|
Re: Help With Javascript Merge Sort by Nobody: 12:21am On May 10, 2022 |
[quote author=IhateRetards post=112680486][/quote] Thanks |
Re: Help With Javascript Merge Sort by Laryfrosh: 2:35am On May 10, 2022 |
[quote author=IhateRetards post=112680486][/quote] Please do you have the PDF for this |
(1) (Reply)
Event Management System Project In PHP With Source Code / Solution To This Cashless Policy Of The FG And CBN / Alx Projects
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 10 |