Re: converting decimal to binary
- From: rem642b@xxxxxxxxx (Robert Maas, see http://tinyurl.com/uh3t)
- Date: Sat, 16 Apr 2005 12:16:36 -0700
> From: "Baloch" <zohaibbaloch@xxxxxxxxx>
> please help me to convert decimal into binary using recursive functions
I assume you mean help you figure out how to design such an algorithm,
right? OK, first thing to do is figure out a natural way to separate
the easy case from the hard case, where you can just write down the
answer to the easy case whereas the hard case may require recursion.
Please make a decision and post it and I'll check if it's reasonable.
If not reasonable, I'll help you correct that decision.
If reasonable, I'll advise you what you need to do next.
.
Relevant Pages
- Re: How can I make this function simplier?
... | So what criterion do you use when deciding how to write a recursion? ... the algorithm you're performing are expressed naturally in a ... You write iterative algorithms when the data you're traversing or ... put much more weight on the recursive side], "How To Design Programs" ... (comp.lang.lisp) - Re: Looking for a good number theory book with lots of theorems.
... I think this is very nice book especially for those who have a good computer science background (who of course did study a course in analysis and design of algorithm) ... but my advice this the book you should look for. ... Prev by Date: ... (sci.math) - multiply 2 vectors or arrays of integers
... algorithm is, use recursion to do it?, or use nested loops and multiply each ... Prev by Date: ... (comp.programming) - Re: Complexity of a specific kind of instances of a NP-complete problem
... because it is always possible to design an algorithm which ... an instance in the code of the algorithm. ... the standard algorithms for solving the NP-complete problem in question ... Prev by Date: ... (comp.theory) - Re: coerce for arbitrary types
... the algorithm itself is essentially last-in first-out, ... via some sort of recursion? ... WaitStack <= new stack containing topnode ... As nested lists, there's only one number in a proper position. ... (comp.lang.lisp) |
|