Qualcomm Interview Question for Software Engineer / Developers






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

as far as detecting loops in a linked list...one soln is to see the linked list as a graph with nodes as vertices....and cycle detection in a graph can be done with back edges in O(n) time.

- Anonymous February 17, 2007 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Take two pointers to traverse the list. Keep incrementing the first pointer by one(i.e make it point to next node) and the second pointer by two. After every increment check whether they point to same node. If they do then that is the node where the loop is.

- ace January 27, 2008 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

n=----
for(i=0;i<sizeof(int)*8;i++)
{
if(n&1)
{
c++;
n>>1;
}

printf ("%d",c);

- Thirumal June 06, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

i=0;
while (x) 
{
   ones+=((x>>i++)&0x1);
}

- Anonymous October 05, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

Simple, keep on adding data into a array, and on nextElement traversal, check if the data matches with any stored in the array.

- XxX November 17, 2007 | 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