Grokking the Coding Interview: Patterns for Coding Questions
Ask Author
Back to course home

0% completed

Vote For New Content
Seems that DP would work better here - solution would be O(n * target)

Victor Defontnouvelle

Sep 4, 2022

Seems that DP would work better here - solution would be O(n * target)

0

0

Comments
Comments
Shubham Vora
Shubham Voraa year ago

DP might have a time complexity of O(n^4) as we need to handle Quadruplets.

On this page

Problem Statement

Try it yourself