We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
In this video, the author teaches me how to optimize the code, because normally in the bruteforce approach we will use two nested for-loop to achieve the solution. If we use two nested for-loop it will be O(n^2) complexity. The author teaches in java in the video, my solutions in javascript is below and it will gives you Big O of n complexity.
Divisible Sum Pairs
You are viewing a single comment's thread. Return to all comments →
Hi Folks, I refered this video -> https://youtu.be/9qPtxAY9bKA?si=GxoR7wwEyyVYO3vV
In this video, the author teaches me how to optimize the code, because normally in the bruteforce approach we will use two nested for-loop to achieve the solution. If we use two nested for-loop it will be O(n^2) complexity. The author teaches in java in the video, my solutions in javascript is below and it will gives you Big O of n complexity.