Добавить
Уведомления

Array - 37: Find all Quadruple for given Sum

Source Code:https://thecodingsimplified.com/find-all-quadruple-for-given-sum/ Solution: - Sort the array - Take two loop & iterate each element - Now for each element, you check if there exists a pair whose sum is equal to targetSum - current value - When you find out value, you add in final list, else you increase start or decrease end depending on value addition Time Complexity: O(n * n * n) Space Complexity: O(1) Do Watch video for more info CHECK OUT CODING SIMPLIFIED https://www.youtube.com/codingsimplified ★☆★ VIEW THE BLOG POST: ★☆★ http://thecodingsimplified.com I started my YouTube channel, Coding Simplified, during Dec of 2015. Since then, I've published over 400+ videos. ★☆★ SUBSCRIBE TO ME ON YOUTUBE: ★☆★ https://www.youtube.com/codingsimplified?sub_confirmation=1 ★☆★ Send us mail at: ★☆★ Email: thecodingsimplified@gmail.com

12+
27 просмотров
2 года назад
12+
27 просмотров
2 года назад

Source Code:https://thecodingsimplified.com/find-all-quadruple-for-given-sum/ Solution: - Sort the array - Take two loop & iterate each element - Now for each element, you check if there exists a pair whose sum is equal to targetSum - current value - When you find out value, you add in final list, else you increase start or decrease end depending on value addition Time Complexity: O(n * n * n) Space Complexity: O(1) Do Watch video for more info CHECK OUT CODING SIMPLIFIED https://www.youtube.com/codingsimplified ★☆★ VIEW THE BLOG POST: ★☆★ http://thecodingsimplified.com I started my YouTube channel, Coding Simplified, during Dec of 2015. Since then, I've published over 400+ videos. ★☆★ SUBSCRIBE TO ME ON YOUTUBE: ★☆★ https://www.youtube.com/codingsimplified?sub_confirmation=1 ★☆★ Send us mail at: ★☆★ Email: thecodingsimplified@gmail.com

, чтобы оставлять комментарии