Search:

Type: Posts; User: helloworld922

Search: Search took 0.37 seconds.

  1. Replies
    3
    Views
    1,585

    Re: How would you approach this?

    Clever :) It's basically the same idea except you left it in the recurrence relationship form, and I had removed the recurrence relationships. Both equally correct and quick to compute.
  2. Replies
    3
    Views
    1,585

    Re: How would you approach this?

    Mathematical formulas for computing the value at each diagonal:

    n^2-x*(n-1), where n is the width of the sub-spiral and x is which diagonal (0 is top-left, going counter-clock wise).

    Simply sum...
Results 1 to 2 of 2