Nice

• ###### AdryanCourtialcommented on "Sum of two lowest positive integers" javascript solution

Ok sooo for task with Large array what is the type of Sort you advises ?

• ###### Ombomcommented on "Sum of two lowest positive integers" javascript solution

The sorting approach is generally less efficient for this specific task, especially when dealing with large arrays, due to the higher time complexity of the sorting algorithm. The looping approach focuses on finding only the two smallest numbers, resulting in better performance for this particular requirement.

• ###### Shuvo101commented on "Sum of two lowest positive integers" javascript solution

how dose the code runs? your code gives me sort is not a function 😕

• ###### imaNamicommented on "Sum of two lowest positive integers" javascript solution

This comment is hidden because it contains spoiler information about the solution

• ###### user6599585commented on "Sum of two lowest positive integers" javascript solution

what is the point in storing the result of running sort method on the array if it's an 'in-place' algorithm?

Approved

• ###### saudiGuycreated a suggestion for "Drunk friend" kata

python new test framework is required. updated in this fork

• ###### toacincommented on "Sum of two lowest positive integers" javascript solution

He did not do the same thing. The .sort() method has a time complexity of O(n log(n)). This algo can be solved with one simple for loop as seblm described with a time complexity of O(n), which will be far more performant as your array grows in size.

• ###### mrbilalaraincommented on "Sum of two lowest positive integers" javascript solution

ofcourse its a performance killer, but we try to be smart here by providing a solution with less lines possible.

• ###### mrbilalaraincommented on "Sum of two lowest positive integers" javascript solution

mine is just fine smaller and confined

• ###### mrbilalaraincommented on "Sum of two lowest positive integers" javascript solution

whats the difference than? you did the same thing.

• ###### Klixelcommented on "Sum of two lowest positive integers" javascript solution

in js, sort by itself works by comparing strings, so the use of `a - b` coerces those two values into a number (less than zero, zero, or greater than zero)