Consider an array [1,2,3,4]. We will start by creating two new lists/arrays, referred to as prefix_product and suffix_product, both initialized to 1. The length of prefix_product and suffix_product will be equal to the length of the input_array. To fill the prefix_product, traverse the input_array from left to right (i.e., from index 0 to n-1), where each element in prefix_product represents the product of all preceding elements in the input_array. For example, the prefix_product will be [1, 1, 2, 6]. To fill the suffix_product, traverse the input_array from right to left (i.e., from index n-1 to 0), where each element in suffix_product represents the product of all elements that follow the current element in the input_array. For instance, the suffix_product will be [24, 12, 4, 1]. Finally, to obtain the output, for each index in the input_array, multiply the corresponding elements from prefix_product and suffix_product. The resulting array will be [24, 12, 8, 6].