Re: Algorithms
- From: Patricia Shanahan <pats@xxxxxxx>
- Date: Thu, 29 Mar 2007 09:04:41 GMT
jt wrote:
Richard Reynolds wrote:
that Roman numeral one looks like a pretty horrible algorithm at first glance, why don't you try to come up with a more elegant one for some practice? Look for general rules and exceptions to start with.Funny, I thought it was pretty clever myself, better than anything I could come up with on my own. I was thinking about an array based solution but couldn't come up with the algorithm...
There are two things I don't like about that algorithm:
1. Too many magic constants. That is partly a fault of the coding style.
The constants could have been made more meaningful.
2. Repeated code that differs only in a few constants.
Patricia
.
- Follow-Ups:
- Re: Algorithms
- From: jt
- Re: Algorithms
- References:
- Algorithms
- From: jt
- Re: Algorithms
- From: Richard Reynolds
- Re: Algorithms
- From: jt
- Algorithms
- Prev by Date: Re: problem with applet access to web service
- Next by Date: Re: Algorithms
- Previous by thread: Re: Algorithms
- Next by thread: Re: Algorithms
- Index(es):
Relevant Pages
|
|