Design a function that finds all positive numbers

Ranjith Bantu ranjithbantu at gmail.com
Tue Apr 9 04:36:23 EDT 2019


A numeric array of length 'N' is given. you need to design a function that finds all positive numbers in the array that have their opposites in it swell. give the approach for solving the optimal average or best case performance. answer will be your obsolute.
Array: -7,4,-3, 2, 2, -8, -2, 3, 3, 7, -2, 3, -2
sorted: -2, -2, -2 ,2 ,2, -3, 3, 3, 4, -7, 7, -8?

can I solve any problems like this by learning python? if anybody knows this answer or any mistakes in this question, please explain to me in detail? I wanna practice more problems like this thank you.



More information about the Python-list mailing list