Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

파스칼삼각형

829 views

Published on

  • Be the first to comment

  • Be the first to like this

파스칼삼각형

  1. 1. [팀 이름] 소집단 활동 보고서, 과제수행일지[팀원] 소집단 활동 자체 평가표 집단에대하여 집단활동을 수행하면서 그 절차에 대해 무엇을 배웠는가? 4. (complexity) (complexity) (space complexity) (time complexity) . 4.1 (complexity) 4.2 (space complexity) 4.3 (time complexity) 4.1 (complexity) .( ) . . , . , . , , . (time complexity) . (time complexity) (space complexity) . (memory) . [ 4.1] (complexity) • (time complexity):
  2. 2. • (space complexity): 4.2 (space complexity) (space) . 1. : , .2. : . , (recursion stack) . . , . . [ 4.1] 1 float abc(float a, float b, float c) { return(a + b + b*c + (a + b - c)/(a + b) + 4.0); } = 0 a, b, c . , float (word) , 3 . a, b, c (parameter) abc 0 . [ 4.2] 2 float Sum(float a[], int n) { float s = 0.0;
  3. 3. for(int i = 1; i < = n; i++) s += a[i]; return s; } = n + 3 a[], n, s, i . a[] n . [ 4.1] a[] n . , n for- . a[] n . (a[] ) + ( n, s, I ) = n + 3 . [ 4.3] 3 float RSum(float a[], int n) { if(n <= 0) return (0.0); else return (RSum(a, n-1) + a[n]); } = 3(n + 1) (resursion) . a[], n . n if- . , a[] a[] n .a[] n , (a[] n ) + (n ) = 1 + 1 . . , (the depth of recursion) , (return address) . (depth of recursion)×(a[n], n, ) = (n+1)×3 .

×