state time and space complexity of this method
<p>in this method i am finding the largest rectangle. i need to know it's space &amp; time complexity. </p>

<p>public int RectangleArea(int[][] A,int m,int n){</p>

<pre><code>    int[] oneD;
    /*
                    Some variables here

              */
    for (int i = 0; i &lt; m; i++) {
        oneD = new int[n];
        for (int k = i; k &lt; m; k++) { 
            /*
            some code is here............
                                           */
              for (int j = 0; j &lt; n; j++) {
                /*
            some code is here............
                                           */
                if (oneD[j] == y) {
                    sy = (x == 0) ? j : sy;

                    if (x &gt; curmaxX) {
                        /*
            some code is here............
                                           */
                    }
                } else {
                    x = 0;
                }
            }
            x = curmaxX;
            x = (x == y) ? x - 1 : x;
            if (x * y &gt; maxX * maxY) {
                /*
            some code is here............
                                           */
            }
        }
    }

    }
</code></pre>

<p>return maxX*maxY;</p>
