Facebook | Phone | Product of Array Except Self & Divide Integers

Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2020-04-02Added By Anonymous
Source: Link

Company: Meta (Facebook)
Role: unknown
Interview Stage: Phone Screen
Location: unknown
Year: unknown

Original Post Content:

Question 1:
https://leetcode.com/problems/product-of-array-except-self/, but with no restriction on use of division.

Question 2:
Given dividend and divisor, return quotient and remainder. Using division or mod operator is not allowed. Do it in better than linear time.

Example:

Input: dividend = 13, divisor = 4
Output: 3, 1

Follow up questions: recursive vs iterative solutions.

(I couldn't find the same problem on LC. The closest one is: https://leetcode.com/problems/divide-two-integers/. But, since multiplication is allowed - the solution is different).

Comments