Re: How to make a prog more efieiant (in C)
Sorry if i mislead some one im just trieng to make my progy work better. (It's an HW assignment)
btw do you mean :res_3
loop to rearnge the res_2
and (res_2==res_3)?0:1; ?
On 12/1/06, Kevin Ross <email@example.com> wrote:
Is this from a recent job interview, with whiteboard programming questions?
Anyway, get_max_digit() and get_sum_digits() seem perfectly reasonable. For reverse_num() and is_symmetric(), about the only other approach I can think of is converting the numbers to strings first, do your manipulations, then convert back to integers. It would be fewer lines of code probably, but not necessarily more efficient.