Help with Java Array

Discussion in 'JavaScript' started by murra85, Sep 25, 2008.

  1. #1
    Hey!

    Pretty fresh with java so bear with me;

    Im trying to find a way to sum up each row in a 2d array and to show the highest sum of a row in an output and which row the highest value is in.

    Any ideas on where to look/hints? :confused:

    Thanks in advance! :)
     
    murra85, Sep 25, 2008 IP
  2. MMJ

    MMJ Guest

    Messages:
    460
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you could work that out in pseudo-code I could help you covert it to JavaScript.
     
    MMJ, Sep 25, 2008 IP
  3. leska

    leska Member

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #3
    You need to create two loops. In the nested loop you'll calculate sum. As result you'll get one 1d array with sums. Then you need to find max value in this array.
     
    leska, Sep 26, 2008 IP