dp with size 2^n (where n is the number of points) and set all values to a large number (e.g., INT_MAX).dp[1 << i] to 1, as each point alone can be covered by a single line.(i, j) and calculate the line they form. Use the GCD of the differences in x and y coordinates to normalize the slope.(i, j), iterate over all other points k to check if they lie on the same line. If so, include them in the bitmask.dp array for the bitmask representing points (i, j, k...) on the same line to 1.dp array using the formula dp[i] = min(dp[i], dp[j] + dp[i - j]) for all j that are subsets of i.dp[(1 << n) - 1] as the answer, which represents the minimum number of lines needed to cover all points.