I have encountered this problem during my preparation for the interview, I can\'t think of an elegant way to solve it:
Given an array of positive integers and target K, a