Qualcomm Interview Question for Software Engineer / Developers






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

Good one. taking value as array index is the basis of hashing technique.

- Mac March 01, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

But, everybody is missing the point that the values are double?

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

how abt hash table

- cunomad September 08, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

follow up would probably be O(1) space..

- Anonymous September 11, 2009 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

construct a binary tree

- Anonymous October 26, 2009 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

1 3 4 2 3

Marking a[1] -ve ==> 1 -3 4 2 3
Marking a[3] -ve ==> 1 -3 4 -2 3
Marking a[2] -ve ==> 1 -3 -4 -2 3
Marking a[4] -ve ==> 1 -3 -4 -2 -3
now sees a[3] is already minus. 3 is a duplicated value

- Jing May 06, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

but this will help only max number in array is less than array range can we have any better solution?

- ridercoder October 22, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

if values are from 0 to n - 1 XORing is a better technique.

- Anonymous March 21, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Any comparison algorithm can't have complexity better than O(nlogn) in this case.
To achieve O(nlogn) complexity, first sort the array by an O(nlogn) method and check for duplicates by iterating the array.

To achieve O(n) complexity, we can use hashing.

- sid1505 September 06, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

Hey any openings in qualcomm for freshers in India????

- raj September 08, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

yeah

- Anonymous January 06, 2010 | Flag
Comment hidden because of low score. Click to expand.
-1
of 3 vote

If the array is of length n and contains elements between 0 to n - 1 then we can do it by sequentially traversing the array and making elements -ve. If we find an already marked -ve element then that is duplicate

1 3 4 2 3

Marking a[1] -ve ==> 1 -3 4 2 3

Marking a[3] -ve ==> 1 -3 4 -2 3

Marking a[4] -ve ==> 1 -3 4 -2 -3

Marking a[2] -ve ==> 1 -3 -4 -2 -3

See that a[3] is already -ve => 3 is duplicate element

- Anonymous November 27, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

can any one understand?

- Anonymous January 06, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

No

- Anonymous February 02, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

dont quite understand this

- Anonymous May 07, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

but there is no this constraint

- Ted June 08, 2012 | 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