On 06/11/2017 06:02 PM, helxi wrote:
Is it possible to sum an array in O(1)?

It's possible to maintain the sum as elements are added and removed. Then, accessing it would be O(1).

Ali

  • O(1) sum helxi via Digitalmars-d-learn
    • Re: O(1) sum Stefan Koch via Digitalmars-d-learn
    • Re: O(1) sum Ali Çehreli via Digitalmars-d-learn

Reply via email to