Sign of the Product of an Array Problem
Sign of the Product of an Array Problem — ExecCode Easy DSA Practice
Solve the Sign of the Product of an Array problem on ExecCode. Free online easy DSA practice in Arrays - Logic Building. Write and run code in Java, C++, Python — no signup required to run.
Description Implement a function signFunc(x) that returns: 1 if x is positive. -1 if x is negative. 0 if x is equal to 0. You are given an integer array nums. Let product be the product of all values in the array nums. Return signFunc(product). Examples Example 1 Input: nums = […
Practice Sign of the Product of an Array free on ExecCode. Browse more ExecCode DSA problems.