Wireless Generation Interview Question for Software Engineer / Developers






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

The question is confusing. Please rephrase it or make it clear with an example.

- Anonymous December 08, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I guess he probably means that we are given with an array of integers and a number,say x. And we have to find whether some of the numbers in that array can be combined to sum up to the given number x.

Please correct me if I am wrong!
And regarding the algo still thinking about it!!

- Mohit December 08, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Mohit,
you are right.

- xuan December 10, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

generate a power set of the array and then at every step of generation sum it up to see if it adds up to the required sum.

very poor approach though as the complexity is 2^n.

- some guy December 11, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

use a Harshtable and the complexity could be O(n). Just check for each integer a, find if x-a is in the harshtable

- gang December 11, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I had the same answer as gang did.

- xuan December 11, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

This is not a 2-sum problem! It's asking ANY combination, not just two integers.

- Anonymous December 14, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Assuming the list contains all positive integers

1) Sort the list  --> O(nlg(n))
algo():
1) for i =0 to len(list)
2)    for j = i+1 to len(list) #here key is the element
3)        if(list[i]+list[j] > key)
4)              break
5)        else if (list[i]+list[j] == Key)
6)              print i,j
7)    end for
8) end for

- Arun December 15, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I guess as we have to check every combination worse case of O(n^2) will always be, there,,,

- Arun December 15, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

check this 12 34 54 -16 23 4 65

if I need to have sum 57

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

guys - any thought on this??

- Justin December 17, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Yeah, O(n^2) is the only way to do this

- anon December 22, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I do not understand how two of the following mean the same (or what the original question means)? The original question does not make any sense.

1. give you a set of points and a 3-D matrix;identify if any comb in the set is equal to the square plane.
2. I guess he probably means that we are given with an array of integers and a number,say x. And we have to find whether some of the numbers in that array can be combined to sum up to the given number x.

- NoConnection December 27, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I do not understand how two of the following mean the same (or what the original question means)? The original question does not make any sense.

1. give you a set of points and a 3-D matrix;identify if any comb in the set is equal to the square plane.
2. I guess he probably means that we are given with an array of integers and a number,say x. And we have to find whether some of the numbers in that array can be combined to sum up to the given number x.

- NoConnection December 27, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

any help?

- noconnection December 29, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

no one here?

- Anonymous December 30, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

no one here?

- noconnection December 30, 2009 | 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