Sum of subsquares

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nivedita prasad
    New Member
    • Dec 2009
    • 7

    Sum of subsquares

    hi
    ..consider a two dimensional array A[N][N] of the order n x n.Then you find the sub-squares and display the largest sum of the sub-square.Sub- squares are the contigious elements in the array.Largest sum can be find out by summing the elements in the sub-square.

    Regards,
    Nivedita Prasad
  • newb16
    Contributor
    • Jul 2008
    • 687

    #2
    So, it's about finding i0,i1, j0,j1 such as i1-i0 = j1-j0 and sum(i0<=i<=i1, j0<=j<=j1] A[i][j] is maximal? Without bruteforcing it for N**3 for all possible positions(N*N) and sizes (N) ?

    Comment

    • nivedita prasad
      New Member
      • Dec 2009
      • 7

      #3
      if possible...give a code for it

      Comment

      • newb16
        Contributor
        • Jul 2008
        • 687

        #4
        Code for what?......

        Comment

        • Banfa
          Recognized Expert Expert
          • Feb 2006
          • 9067

          #5
          The experts on this site are more than happy to help you with your problems but they cannot do your assignment/program for you. Attempt the assignment/program yourself first and post questions regarding any difficulties you have or about a particular function of the code that you don't know how to achieve.

          Please read the Posting Guidelines and particularly the Coursework Posting Guidelines.

          Then when you are ready post a new question in this thread.

          Banfa
          Administrator

          Comment

          Working...