238. Product of Array Except Self | Python | MANG Question | Leetcode | English | code io

Опубликовано: 19 Май 2026
на канале: code io - English
128
1

238. Product of Array Except Self
https://leetcode.com/problems/product...

In This video I have discussed a Naive approach to solve the problem and also have explained the Optimised approach and I have coded the solution in Python

GitHub link - Solution (Python, Java and C++)
https://github.com/c0de-i0/LeetCode-S...

Follow us on

Instagram
Goms -   / goms.io  
Siva -   / siva.io  

Linkedin
Goms -   / gomathinayagam-avudaikumar-509a7716a  
Siva -   / sivasubramanian-a-443519225  

238. Product of Array Except Self
Given an integer array nums, return an array answer such that answer[i] is equal to the product of all the elements of nums except nums[i].

The product of any prefix or suffix of nums is guaranteed to fit in a 32-bit integer.

You must write an algorithm that runs in O(n) time and without using the division operation.

Tags
#leetcode #interview #interviewpreparation #interviewprep #geeksforgeeks #amazoninterviewpreparation #amazoninterviewquestionsandanswers #mang #faang #fang #google #googleinterview #netflixinterview #hackerrank #leetcodesolutions #leetcodequestions #python #pythonprogramming