Given an array of integers nums and an integer target, return an array of arrays containing all unique triplets that add up to target. Each returned triplet must be in ascending order, and the final result must not contain duplicate triplets. You may assume nums has at least 3 elements. Example: This is a generalized…