A Very Big Sum Solution in Javascript

  • int ar[n]: an array of integers .
  • long: the sum of all array elements
  • 1 ≤ n ≤ 10
  • 0 ≤ ar[i] ≤ 10¹⁰
5
1000000001 1000000002 1000000003 1000000004 1000000005
5000000015

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

New Features in Angular 8

The Weekend Newsletter

Learn immutability with JavaScript

My Startup is Collapsing and I Can’t Do Anything About It

Story of failure in my startup

CentOS8 configuration for Japanese input

My keyboard

Async/Await Promises

How we built a component library that people actually enjoy using

EasyBridge:A new design of JS-Brdige

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Travis Lee

Travis Lee

More from Medium

Maintaining Authenticity

The SOLID Principles of Object-Oriented Programming and NoSQL

Destructuring Arrays and Objects

(Nov 06, 2013) WKML Junior Bootscooters