Open sanjarcode opened 2 years ago
There are times in DnC when we use partitioning of problems just for the sake of avoiding brute force enumeration, and we may not combine solutions to subproblems at all.
Maybe this is not DnC, but it's an alternative to brute-force enumeration.
Here's a problem that I solved using this "kind of DnC" approach: https://leetcode.com/problems/count-number-of-pairs-with-absolute-difference-k/
There are times in DnC when we use partitioning of problems just for the sake of avoiding brute force enumeration, and we may not combine solutions to subproblems at all.
Maybe this is not DnC, but it's an alternative to brute-force enumeration.
Here's a problem that I solved using this "kind of DnC" approach: https://leetcode.com/problems/count-number-of-pairs-with-absolute-difference-k/