Given an integer array nums and an integer goal, choose a subsequence such that the sum is closest to goal. Return the minimum absolute difference.
Constraints: nums.length up to . Brute force is too slow. It requires meet-in-the-middle.
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
Given an integer array nums and an integer goal, choose a subsequence such that the sum is closest to goal. Return the minimum absolute difference.
Constraints: nums.length up to . Brute force is too slow. It requires meet-in-the-middle.