A priori and asymptotic complexity level

How to determine the a priori and asymptotic complexity of following program code? #include int br_nacina_zaba(int br_lopoca, int tren_poz, int korak) { if (korak == 18) return 0; else if (tren_poz == br_lopoca) return 1; else if (tren_poz <= 0 && korak != 0) return 0; else if (tren_poz > br_lopoca) return 0; else return br_nacina_zaba(br_lopoca, tren_poz + 2, korak + 1) + br_nacina_zaba(br_lopoca, tren_poz + 3, korak + 1) + br_nacina_zaba(br_lopoca, tren_poz - 2, korak + 1) + br_nacina_zaba(br_lopoca, tren_poz - 3, korak + 1); } So I need to know the complexity of function `br_nacina_zaba(n,0,0)`.
What's a "complexity" level? And what's an "a priori" one?

以上就是A priori and asymptotic complexity level的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » CSS3 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏