Re: Really **wonderful** website for C interview questions!!!!!
- From: rem642b@xxxxxxxxx (Robert Maas, see http://tinyurl.com/uh3t)
- Date: Tue, 05 Jul 2005 23:40:36 -0700
> From: rajanarayan2005@xxxxxxxxx
> http://www.cracktheinterview.com
I saw your article just tonight and took a look at that Web site. What
I like is that the answers are technically correct. For example, given
only a pointer to a single node in a singly-linked list, how do you
delete that one node? You can't! But you can fake it by deleting the
next element after it and moving the data from it to the original node,
but technically you haven't deleted the node so that's not a valid to
the question as stated. But it's close enough. But what if the node is
the last, then you can't even do that. But if there's a convention for
marking "ignore" nodes, you can do that. Indeed except for those subtle
points he got the answer pretty correct, better than I expected.
What I don't like about the site is that code examples are given as
arbitrarily large unstructured programs, instead of a series of small
tools built bottom up with the topmost tool being a simple and easy to
understand application of the lower-level tools. His multi-page code
for printf was the clincher in my mind. It didn't even deal with
floating point. Imagine if the *entire* specification of printf were
implemented in his style, something like fourty pages of code all in a
single illegible mega-function. He needs to learn structured
programming, and apply it in his code examples.
Also I don't see it reasonable to treat his Web site as true FAQs,
whereby somebody not knowing anything about C, wishing to fake an
interview, crams for the exam. Some of the answers are decent
conceptual points, but others are just huge meaningless batches of code
that nobody could possibly memorize (without understanding) to recite
at an interview. On the other hand, if the code were properly
structured, somebody might actually be able to understand the examples
and learn something from them.
Would anybody pay me to re-do the Web site to have nicely structured
code examples, and then to write a CAI program that actually teaches
novices everything there? By the way, most of the questions have almost
nothing to do with C, they are general questions about various kinds of
data structures (mostly linked lists) and have equal applicability in C
or LISP or other language where one wishes to implement or use linked
lists. I think virtually all the examples would be better written as
general programming algorithm questions agnostic as to the specific
programming language to be used. The ones that ask the applicant to
implement a known C library function can be broken into thre parts:
(1) What is the API specification for the particular named C-library
function, (2) Given the following abstract specification for a function
definition, what algorithm would implement it, (3) Given the following
pseudo-code algorithm, how might you code it in a particular language,
such as C. If I were the interviewer, I'd pick some function that was
*not* in the standard library for that language, but *is* in the
standard library for some other language, explain the API for it to the
job applicant so I was sure he knew what interface was needed, and ask
both what algorithm to use and how that algorithm would be implemented
in this language to match what the other language already provided.
(No, I would not go the other way, asking how a library function in
this language would be implemented in some other hypothetical
language.)
.
- Prev by Date: A binary question
- Next by Date: Re: Really **wonderful** website for C interview questions!!!!!
- Previous by thread: Re: Really **wonderful** website for C interview questions!!!!!
- Next by thread: graphics and mouse programming
- Index(es):
Relevant Pages
|