79479081

Date: 2025-03-02 12:26:15
Score: 1
Natty:
Report link

In 2025 if you're using python, it offers a built in function sum().

arr = [1,2,3,4,5]
sum_of_elements = sum(arr)

since it iterates through all the n-elements for making sum, the time complexity is O(n)

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Mruthyunjaya R