Groups | Search | Server Info | Keyboard shortcuts | Login | Register
Groups > comp.os.linux.misc > #77408
| From | John Ames <commodorejohn@gmail.com> |
|---|---|
| Newsgroups | comp.os.linux.misc, comp.os.linux.advocacy |
| Subject | Re: Simple Programming Challenge |
| Date | 2025-11-12 08:07 -0800 |
| Organization | A noiseless patient Spider |
| Message-ID | <20251112080756.00000989@gmail.com> (permalink) |
| References | <18774b74533f13ac$14097$3668313$802601b3@news.usenetexpress.com> <5L1RQ.59910$3VN7.27458@fx41.iad> |
Cross-posted to 2 groups.
On Wed, 12 Nov 2025 10:31:13 -0500 "Joel W. Crump" <joelcrump@gmail.com> wrote: > > Seems trivial, eh? > > > > This is an interview question that I give to my applicants and no > > one has passed yet. > > Why would anyone waste their time on such a lame project? It's a trivial "are you even qualified to be here?" interview question, but yeah, it's not a terribly interesting problem. Assuming you're not on an architecture where division is computationally expensive, and I/O is counted as "free," the only meaningful performance consideration is branching. (If you *are* on an architecture where division is expensive, it might be interesting to exploit the fact that the sum of individual nybbles in a word down to a single nybble - i.e., if sum >= 0x10, recurse - can be compared against 0x5, 0xA, and 0xF to check for divisibility by five and 0x3, 0x6, 0x9, 0xC, and 0xF for divisibility by three, but I'm not sure whether that'd save you any time over Russian-peasant division.)
Back to comp.os.linux.misc | Previous | Next — Previous in thread | Next in thread | Find similar
Simple Programming Challenge Joe Fantastic <jf@linux.rocks> - 2025-11-12 15:19 +0000
Re: Simple Programming Challenge "Joel W. Crump" <joelcrump@gmail.com> - 2025-11-12 10:31 -0500
Re: Simple Programming Challenge John Ames <commodorejohn@gmail.com> - 2025-11-12 08:07 -0800
Re: Simple Programming Challenge ram@zedat.fu-berlin.de (Stefan Ram) - 2025-11-12 16:18 +0000
Re: Simple Programming Challenge Joe Fantastic <jf@linux.rocks> - 2025-11-12 16:41 +0000
Re: Simple Programming Challenge Pancho <Pancho.Jones@protonmail.com> - 2025-11-12 17:29 +0000
Re: Simple Programming Challenge Pancho <Pancho.Jones@protonmail.com> - 2025-11-12 17:33 +0000
Re: Simple Programming Challenge Richard Kettlewell <invalid@invalid.invalid> - 2025-11-13 00:00 +0000
Re: Simple Programming Challenge Pancho <Pancho.Jones@protonmail.com> - 2025-11-13 10:45 +0000
Re: Simple Programming Challenge Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-11-12 23:30 +0000
Re: Simple Programming Challenge ram@zedat.fu-berlin.de (Stefan Ram) - 2025-11-13 13:24 +0000
Re: Simple Programming Challenge Ralf Fassel <ralfixx@gmx.de> - 2025-11-13 16:16 +0100
Re: Simple Programming Challenge Fritz Wuehler <fritz@spamexpire-202511.rodent.frell.theremailer.net> - 2025-11-12 18:37 +0100
Re: Simple Programming Challenge Brock McNuggets <brock.mcnuggets@gmail.com> - 2025-11-12 20:05 +0000
Re: Simple Programming Challenge "Joel W. Crump" <joelcrump@gmail.com> - 2025-11-12 15:30 -0500
Re: Simple Programming Challenge Brock McNuggets <brock.mcnuggets@gmail.com> - 2025-11-12 20:50 +0000
Re: Simple Programming Challenge John McCue <jmclnx@gmail.com.invalid> - 2025-11-12 17:22 +0000
Re: Simple Programming Challenge c186282 <c186282@nnada.net> - 2025-11-12 23:57 -0500
Re: Simple Programming Challenge Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-11-12 23:24 +0000
csiph-web