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

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

by John M. Dlugosz (Monsignor)
on Sep 03, 2002 at 21:47 UTC ( [id://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.?

—John

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2024-04-19 13:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found