We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • Hackerrank Home
  • Prepare
    NEW
  • Certify
  • Compete
  • Career Fair
  • Hiring developers?
  1. Prepare
  2. Algorithms
  3. Warmup
  4. A Very Big Sum
  5. Discussions

A Very Big Sum

Problem
Submissions
Leaderboard
Discussions
Editorial

Sort 1474 Discussions, By:

votes

Please Login in order to post a comment

  • JoshuaLamusga
    7 years ago+ 21 comments

    I don't think that this problem needs to exist because it's redundant with the simple array sum challenge. All I did was change sum's type from int to long in Java, and the challenge even told me how.

    86|
    Permalink
    View more Comments..
  • H4DH1
    7 years ago+ 4 comments

    For people posting their codes, hit enter and tab the first line so it would look coherent.

    {
        CODE Like this
    }
    

    { not like

    this}
    
    26|
    Permalink
    View more Comments..
  • benjamin_van_ng1
    3 years ago+ 8 comments

    My python 3 solution:

    def aVeryBigSum(ar):
        res = 0
        for i in range(len(ar)):
            res += ar[i]
        return res 
    
    21|
    Permalink
    View more Comments..
  • misoknr
    5 years ago+ 0 comments

    One thing is there is similar "challenge" already, although in this case number may be large, that's fine. It is EASY, but why would you give solver a hint about using specific type? Isn't it a point of a challange to find out for yourself that you need to use type that can hold large number? By revealing this in note, solving it is pointless. And this plagues many of the challenges here. Why give solver all the necessary hints right away is beyond me.

    10|
    Permalink
  • KeshaCoder
    6 years ago+ 2 comments

    I'm new to HackerRank--why is there already code in the solution window? Shouldn't we be coding things from scratch?

    7|
    Permalink
Load more conversations

Need Help?


View editorial
View top submissions
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy
  • Request a Feature