Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: (OT) Interview questions -- your response?

by John M. Dlugosz (Monsignor)
on Sep 03, 2002 at 21:47 UTC ( #194911=note: print w/replies, xml ) Need Help??

in reply to (OT) Interview questions -- your response?

Before reading any other replies,

1 a) it's an Order of N-squared algorithm, so it scales poorly.
1 b) Change the approach to N*log(N), which I think is the best possible. A couple sorts and then a linear pass (merge-like logic) would do.

2) $last=$#array;  @array[0..$last] @array[reverse $last..0]; does that still count as cheating because reverse can also be used to reverse an array? for (int loop= 0;  loop < array.elcount()/2;  ++loop)    swap (array[loop], array[-loop]); for something I might actually use in C++. A zillion fun ways to do it, though, and a few jokes.

3) Too vague. Can I assume the existance of a general multi-threaded server for the database? In that case, I just need to abstract the multiple input/output formats. Did you want to know how to write a multithreaded server? If so, what OS, etc.?


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://194911]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2019-05-20 18:31 GMT
Find Nodes?
    Voting Booth?
    Do you enjoy 3D movies?

    Results (128 votes). Check out past polls.