# CS502 Fundamentals of Algorithms Assignment 1 Solution Fall 2014

Question 1 (10) Find the running time complexity of the following piece of code and show your working step by step. yz =0; xw=0; for(i=m; i>-6; i=i-6) { xw++; } for (i=n; i>-2015;i=i-5) { yz=yz+1;} for (i=1;i<=n;i=i*5) { for (j=1;j<=5n;j*12 { for(k=n;k>-5; k=k-4) { x=x+12 } } } Print x; While(k<=z) { k=k*2 ( for(m=k; […]