Posts by HeraldOfVegas • 111 points
1 post
-
11
votes4
answers584
viewsQ: How to verify the efficiency of these 2 functions in C++?
How to determine the best choice between these two functions for implementation? 1: int X(int x){ if(x<=0) return 0; return(x + X(x-1)); } 2: int Y(int x){ int soma=0; for(int i=0;i<=x;++i)…