Amazon Interview Question for Software Engineer / Developers






Comment hidden because of low score. Click to expand.
0
of 0 vote

Hashing is a way of indexing the data, to guarantee O(1) access in the average case.

INT - mod
float - convert into int by multiplying by 10, then mod.
strings - convert to int assuming base 26
objects - convert to int base 128 and then mod(you can also consider only allowed objects)

- Messi February 09, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

>>
strings - convert to int assuming base 26
objects - convert to int base 128 and then mod(you can also consider only allowed objects)
>>

I don't understand , why you are using "base 26" and "base 128" ?

- siva.sai.2020 February 09, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Can't we "void *" as argument to our function to accept all data type. The function should only store the provided data with indexing with the knowledge of the data type.

- SS February 09, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

yeah, right.. V got to use void*..
And regd 2nd sub division, we got to implement get, put and other methods i believe! if we know the appln, we can go with customized hash methods.

- AB February 10, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Nice answer

- siva.sai.2020 March 08, 2014 | Flag


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More