can't figure out how does the memory leak happen in my karatsuba implementation
so my code is supposed to be implementing karatsuba algorithm for multiplication. this is my code #include<stdio.h> #include<string.h> #include<stdlib.h> /* karatsuba's algo: you have 2 numbers x,y you halve each of them a = 1st halve of x b = 2nd halve of x c = 1st halve of y d = 2nd halve of y n = number of digits of the biggest number if it's odd then it is decremented by 1 id n is odd then a and c take a bigger part than b and d respectively. if number of digits of both numbers are different we shift as in concat zeros to the right of the lowest by the difference of the number of digits be
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.