Category Leetcode Solutions

[Solved] You are given an array of integers nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding window moves right by one position.

Leetcode solutions MLP Feature Image

Question You are given an array of integers nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding…

[Solved] 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].

Leetcode solutions MLP Feature Image

Question 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…