Hello I’m currently in the challenge “Return Largest Numbers in Arrays” from the Basic Algorithm Scripting section in the JavaScript Algorithms and Data Structures certification and I came up with this solution:
I got curious and also checked the provided solutions in the challenge guide. I noticed that my solution is different from all those and I would like to get some feedback. I’m still new to this coding stuff and I don’t really know about performace on algorithms, I know it works but I have no idea how efficient it is compared to the other answers
Please post your actual code instead of a picture.
I wouldn’t get caught up in ‘performance’. For most things, as long as you write sensible code, you don’t have to worry about writing a ‘high performance’ algorithm.
We have blurred this solution so that users who have not completed this challenge can read the discussion in this thread without giving away the solution.
I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.