enesoncu's blog

By enesoncu, 9 years ago, In English

I saw this in TopCoder. But I can't understand what the f array show.

f[1][1] = 1;
for( i,2,n )
    for( j,1,i )
        f[i][j] = f[i-1][j-1] + j*f[i-1][j];

Is it Mathematical function? Can someone help?

  • Vote: I like it
  • +21
  • Vote: I do not like it

»
9 years ago, # |
  Vote: I like it +43 Vote: I do not like it
»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

for(j,1,i) means for (int j=1; j<i; ++j) or with j<=i? And how f is initialised — everything in zeros?

»
9 years ago, # |
  Vote: I like it +25 Vote: I do not like it

Such an absolutely wrong manner to ask questions.