An open API service indexing awesome lists of open source software.

https://github.com/ayubamini/returnsignofproduct

Microsoft Codility exam (May 2021) - Return sign product an array
https://github.com/ayubamini/returnsignofproduct

array codility codility-solutions microsoft

Last synced: about 2 months ago
JSON representation

Microsoft Codility exam (May 2021) - Return sign product an array

Awesome Lists containing this project

README

        

# ReturnSignOfProduct (Microsoft Codility exam May 2021)
Write a function solution that, given an array A of N intergers between (-100 and 100) of the product of all the numbers in the array multiplied together. Assume that N is between 1 and 1000.

For example:

Given A = [1, -2, -3, 5], the function should return 1 (the multiplication equal 30)
Given A = [1, -2, -3, 5], the function should return 1 (the multiplication equal -30)
Given A = [1, 2, 0, -5], the function should return 0 (the multiplication equal 0)