Amazon Interview Question for Developer Program Engineers


Country: India
Interview Type: Written Test




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

Use Radix sort.

- Punit Jain May 16, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

+1

- Zhou May 16, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

form 12/mar/2011 as 20110312, in this way we can convert all the dates to a number and then can sort them in O(n * log n) time.

- Hemshankar May 16, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

form 12/mar/2011 as 20110312, in this way we can convert all the dates to a number and then can sort them in O(n * log n) time.

- Hemshankar May 16, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

form 12/mar/2011 as 20110312, in this way we can convert all the dates to a number and then can sort them in O(n * log n) time.

- Hemshankar May 16, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

USe Redix sort here O(k*n) in this case where k=6

- anubhav May 16, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

enumerate the months.
mainly 3 functions are required
1)convert the given string to dd mm and yyyy format.
2)take a date as reference.from this date, convert all the dates into number of days
3)convert the number of days back to string
you can perform any operation you want sort, add subtract by overloading the operator.
this will surely work

- Anonymous May 16, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Clarification needed:
Increasing order of what...
Date, Month , Year or any combination of these three?

- PKT May 19, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

List<string> ar = new List<string>() { "12/mar/2011","15/jan/1990","12/apr/1985","23/dec/1960","11/sep/2004"};
List<DateTime> arDate = new List<DateTime>();
foreach (string date in ar)
{
arDate.Add(Convert.ToDateTime(date));
}
arDate.Sort();
foreach (DateTime dt in arDate)
{
Console.WriteLine(dt);
}

- using .net 3.5 June 24, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

please clarify the ques..

- Aditya Goel July 28, 2012 | Flag Reply


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