tag:blogger.com,1999:blog-811371107174953309.post514529219622304318..comments2023-06-03T21:57:31.715+06:00Comments on forthright48: Euclidean Algorithm - Greatest Common DivisorMohammad Samiul Islamhttp://www.blogger.com/profile/02529335254206670632noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-811371107174953309.post-28081639504814800742018-01-18T20:08:34.059+06:002018-01-18T20:08:34.059+06:00This has a worse time complexity of O(N). Try simu...This has a worse time complexity of O(N). Try simulating fnc(10^9, 1). It's going to take forever...Mohammad Samiul Islamhttps://www.blogger.com/profile/02529335254206670632noreply@blogger.comtag:blogger.com,1999:blog-811371107174953309.post-73161544558640942472017-12-30T21:50:00.735+06:002017-12-30T21:50:00.735+06:00another one:
int fnc(int a, int b){
if(a == b...another one:<br /><br />int fnc(int a, int b){<br /> if(a == b) return a;<br /> else if(a > b) return fnc(a - b, b);<br /> else return fnc(a, b - a);<br />}Anonymoushttps://www.blogger.com/profile/01074325500320544641noreply@blogger.comtag:blogger.com,1999:blog-811371107174953309.post-21376027845289849432017-10-27T01:57:39.689+06:002017-10-27T01:57:39.689+06:00Very Helpfull :)
Thanks vya :)
Very Helpfull :)<br />Thanks vya :)<br />Anonymoushttps://www.blogger.com/profile/13588003496360493143noreply@blogger.comtag:blogger.com,1999:blog-811371107174953309.post-23853400922883556882017-01-07T09:30:58.065+06:002017-01-07T09:30:58.065+06:00Fixed. Thanks :)Fixed. Thanks :)Mohammad Samiul Islamhttps://www.blogger.com/profile/02529335254206670632noreply@blogger.comtag:blogger.com,1999:blog-811371107174953309.post-25420276340331320592016-12-03T18:27:11.362+06:002016-12-03T18:27:11.362+06:00i think the code for Iterative Version will work
...i think the code for Iterative Version will work <br />if while(b) not for while(!b)Anonymoushttps://www.blogger.com/profile/04848814225688879895noreply@blogger.com