binary search - o(log(n))
merge sort - o(nlog(n)) - n items, binary search
hash - convert keys to array index
sums - sort then compare first and last like a binary search, = O(nlogn + logn) or
10+20=30, so 30-20=10, so hash all values, found 10, so try finding (30-10)=20 using hash, so O(n), n = number of items
diff in Amazon, short release cycles
http://www.workopolis.com/work.aspx?action=Transfer&View=Content/Common/ArticlesDetailView&rssURL=http%3a%2f%2fv1.theglobeandmail.com%2fservlet%2fstory%2fLAC.20100219.CAMACKAY19ART01824%2fTPStory%2fTPBusiness%2f%3fpage%3drss&lang=EN&id=GAM.20100219.CAMACKAY19ART01824
- pick an interview schedule near the end of the day so you are memorable
- debrief yourself after the interview, review what you did well or didn't do well, etc.
Top 10 Job search mistakes
http://jobsearch.about.com/od/findajob/tp/jobsearchmistakes.htm
Amazon phone interview
http://www.oliyiptong.com/blog/2006/05/21/the-amazon-phone-interview/
http://www.oliyiptong.com/blog/2006/05/30/amazon-sde-in-person-interview/#comments
http://www.interviewpattern.com/post/Linked-List-Interview-Questions-Part-I.aspx
* Programming questions
o Asks clarifying questions
o Doesn’t start coding immediately
o Rejects bad input
o Checks boundary cases
o Efficiency
o Cleverness
* Design questions
o Asks: Who, what, why, where, when, how
o Thinks outside the box
o Tests the design
o Sells the design
* Brain teasers
o Doesn’t back down
o Explores all avenues
o Challenges assumptions
* In general
o The best. These companies interview a lot of really good people. You need to stand out as the best. If your work or school experience doesn’t make you stand out then pursue something in your spare time that will.
o Persuasive. If you can’t sell yourself and your ideas how will you then sell the companies products?
o Well spoken.
o Confident.
o Relaxed.
o Can work on a whiteboard in front of an audience.
o Verbalizes thought processes while working through problems.
o Can I put this candidate in front of a customer? A partner? an executive?
http://jobinterviews.wordpress.com/2008/01/20/amazon-the-interview/
http://www.jamesbooth.com/OOPBasics.htm
polymorphism
inheritance
encapsulation - hiding implementation details
abstraction
specialization
design first
http://www.techinterviews.com/amazon-interview-questions
http://www.codinghorror.com/blog/2008/01/getting-the-interview-phone-screen-right.html
I understand interviewing is stressful. I've been on the receiving end of it plenty of times myself, and I am totally sympathetic. But please bear in mind we're not looking for perfection here, just familiarity. Remember the disclaimer!
--
Please understand: what I'm looking for here is a *total vacuum* in one of these areas. It's OK if they struggle a little and then figure it out. It's OK if they need some minor hints or prompting. I don't mind if they're rusty or slow. What you're looking for is candidates who are utterly clueless, or horribly confused, about the area in question.
---
http://steve.yegge.googlepages.com/five-essential-phone-screen-questions
ACID (atomicity, consistency, isolation, durability) is a set of properties that guarantee that database transactions are processed reliably.
public String formatRGB ( int r, int g, int b ) {
return String.format ( "%02X%02X%02X", r, g, b );
}
http://en.wikipedia.org/wiki/Virtual_function
a virtual function or virtual method is a function or method whose behavior can be overridden within an inheriting class by a function with the same signature.
grep -l -R --perl-regexp "\b(\(\d{3}\)\s*|\d{3}-)\d{3}-\d{4}\b" * > output.txt
The (concrete) data structures they absolutely must understand are these:
1) arrays - I'm talking about C-language and Java-language arrays: fixed-sized, indexed, contiguous structures whose elements are all of the same type, and whose elements can be accessed in constant time given their indices.
2) vectors - also known as "growable arrays" or ArrayLists. Need to know that they're objects that are backed by a fixed-size array, and that they resize themselves as necessary.
3) linked lists - lists made of nodes that contain a data item and a pointer/reference to the next (and possibly previous) node.
4) hashtables - amortized constant-time access data structures that map keys to values, and are backed by a real array in memory, with some form of collision handling for values that hash to the same location.
5) trees - data structures that consist of nodes with optional data elements and one or more child pointers/references, and possibly parent pointers, representing a heirarchical or ordered set of data elements.
6) graphs - data structures that represent arbitrary relationships between members of any data set, represented as networks of nodes and edges.
http://gigaom.com/2008/11/21/the-growing-ex-amazon-club-and-why-its-a-good-thing/
. For talented people, the allure of working with Jeff Bezos can be what clinches the deal, according to Schappell of TeachStreet, which counts Bezos Expeditions as one of its investors. His company has essentially developed a place where you can go to find things like a French teacher, or someone to give you trombone lessons. I like to call it the Yellow Pages with brains
Those who know Bezos well say that he isn’t afraid of losing and wants to win big — and that means making big bets. This “nothing-in-the-middle” attitude is particularly attractive to folks with an entrepreneurial gene.
Amazon Simple Storage Service (Amazon S3). An unlimited number of data objects, from 1 byte to 5 gigabytes in size, can be stored in S3 and distributed via HTTP or BitTorrent. The service charges monthly fees for data stored and for data transferred. In April 2006, Amazon introduced Amazon Simple Queue Service (Amazon SQS), a distributed queue messaging service. In August 2006, Amazon launched product wikis (later folded into Amapedia) and discussion forums for certain products using guidelines that follow standard message board conventions. In August 2006, Amazon introduced Amazon Elastic Compute Cloud (Amazon EC2), a virtual site farm, allowing users to use the Amazon infrastructure with its high reliability to run diverse applications ranging from running simulations to web hosting. In 2008, Amazon improved the service adding Elastic Block Store (EBS), offering persistent storage for Amazon EC2 instances and Elastic IP addresses, static IP addresses designed for dynamic cloud computing.
why? not far from home, cloud computing, largest online retail, lots of talented people and challenging problems with scalability
http://news.ycombinator.com/item?id=964506
When you are refining your algorithm - talk. Talk about the variables and what'd you name them. Talk about why the nested for loop isn't good. Talk about everything you are thinking of. The whole point of the screen is to get an idea about how you solve problems.
advantages of pointers
.pointers are generally useful in the context where we need a continuous memory allocation. Using pointers dynamic allocation of memory is achieved
pointers basically hold the address of a variable. they are mainly used as function parameters to pass values of parameters as references rather than values
http://c-faq.com/~scs/cclass/notes/sx11a.html
int *p = malloc(100 * sizeof(int))
And finally, don't forget that Amazon is about getting stuff done. That means your solution may be a perl script slicing some data and piping the result through cut, sort, uniq, etc. Don't assume you've got to write a program from scratch to solve every problem.
http://www.phoneinterviewtip.com/phoneinterviewtips.html
Phone interview tips
At the end of the interview make sure you understand what the next step will be. If you are told, "We'll be in touch", ask when that might be. If the only thing you hear is something like, "Thank you for your time", again, ask what the next step will be. Even though this sounds like a brush off, many times it's not.
This has been mentioned already, but it bears repeating: if you don't know the answer to something, don't try to bluff your way through it. Tell them that you don't know the answer to that question, but then tell them how you would go about finding the answer.
A job interview isn't really a test of how much you know. As long as you can demonstrate that you know what you talking about, and can find the answers to anything you don't know, they'll be happy. Mostly they want to get a sense of your personality.
http://ask.metafilter.com/65256/How-do-I-do-well-on-my-phone-interview
I conduct phone interviews much like the one you've described. The best two tips I can give you are:
1) Don't let there be long periods of silence. In person I can tell if you're thinking a question over, but on a phone interview you should ask for clarifying details or restate my question if you need to stall for time.
2) Don't touch your keyboard while we're speaking unless I'm asking you to do something that requires it. Quite often I'll ask someone a technical question and I can hear him/her Googling for the answer. That makes me hyper-aware of any keyboard sounds an interviewee produces.
what interested you the most in my application?
B-trees - a tree data structure most commonly used in databases, fast search, insert, deletion in ammortized time
http://en.wikipedia.org/wiki/B-tree
The B-tree uses all the above ideas. It keeps the records in sorted order so they may be sequentially traversed. It uses a hierarchical index to minimize the number of disk reads. The index is elegantly adjusted with a recursive algorithm. The B-tree uses partially full blocks to speed insertions and deletions. In addition, a B-tree minimizes waste by making sure the interior nodes are at least 1/2 full. A B-tree can handle an arbitrary number of insertions and deletions.
No comments:
Post a Comment