Thread regarding Qualcomm Inc. layoffs

People complaining about H1-B. Let's see how you do on this. Most of you claiming to be "well qualfied for the job" didn't have anything close..

For starters, most candidates couldn't even get past an o(n) = n^2 brute force solution, let alone a solution that was n log n or simply o(n)=n in efficiency...

The problem: you have a sequence of integers that is alternating in sign.....Write an algorithm to find the largest consecutive sequence of integers that produces the largest sum.

For example: -1, 2, -5, 5,-3,2,-1,4,-3,4,-8,5,-5,8,-6

The answer would be: (assuming 0 indexed) n[3]...n[9] and the sum would be 8. ..... (5,-3,2,-1,4,-3,4)

The largest sum in the sequence is 8. It occurs twice in the set of numbers, but the largest sequence is n[3]-n[9], not just n[13]

The algorithm must return the indices of the sequence and the sum.

The ideal solution is o(n) =n in efficiency but a solution o(n) = n log n is fine

Computer language does not matter. Psuedo-code is fine.

by
| 1759 views | | 14 replies (last February 8, 2016) | Reply
Post ID: @OP+FPbAJGB

14 replies (most recent on top)

@FPbAJGB-1gyi. Why do you folks keep comparing yourself to people that shit on the street? Is that what it has evolved to? Can't compete against the one ones here that are kicking your ass, so you compare yourself to the the uneducated ones shitting on the street? What next? Compare yourself to homeless people in the U.S. while chanting "yeah, I'm number 1"? Lol

Are you sure you aren't a blue collar UAW worker?

by
| | Reply
Post ID: @1dmw+FPbAJGB

Good point

by
| | Reply
Post ID: @1lvv+FPbAJGB

Wow. Now go design and implement a system in your own country so you are not pissing and sh** in public.

by
| | Reply
Post ID: @1nyy+FPbAJGB

The H1B program greatly reduces engineering wages for American engineers. If you don't understand that you don't understand basic economics. Increase supply (e.g. supply of labor) lower price.

by
| | Reply
Post ID: @rrm+FPbAJGB

Can you honestly say every american person would be qualified for that position that asked you about principal component analysis? Can you say that someone from IIT with and H1-B would know less than someone from say DeVry here?

by
| | Reply
Post ID: @jcr+FPbAJGB

@FPbAJGB-cvn. I agree, and I wonder how many people complaining about H1-B even know what principal component analysis is? Heck, how many people would even know what random processes are?

by
| | Reply
Post ID: @qja+FPbAJGB

At one of those listed companies I was asked about principal component analysis. Interviews take many forms, not just cookie cutter computer science

by
| | Reply
Post ID: @cvn+FPbAJGB

Cool toy CS example problem bro.

by
| | Reply
Post ID: @cpz+FPbAJGB

I don't know. I guess maybe it tests how you solve difficulting software engineering problems and to see how you approach the unknown. It also tests to see if someone can actually write software versus someone that just knows how to program and knowsnone specific language and only have the skills of a programmer.

Its a pretty common type of question not just at the Q but pretty much standard question most top firms ask. Amazon, facebooks, msft, Broadcom.

by
| | Reply
Post ID: @pjd+FPbAJGB

How would this help with qc bitflipping job.

by
| | Reply
Post ID: @srq+FPbAJGB

@FPbAJGB-qjf.. actually this question was asked by google too. But, thanks for proving my point.. can't do something, blame indians.

by
| | Reply
Post ID: @bxx+FPbAJGB

@FPbAJGB-lat. great. you caught it..... now, write the algorithm...

by
| | Reply
Post ID: @jys+FPbAJGB

Comp Sci Towel Head Bull Sh!t. Just like a Curry Head to pontificate over book knowledge.

by
| | Reply
Post ID: @qjf+FPbAJGB

Your answer is wrong. The largest sequence that produces the sum of 8 is n[3]-n[13].

by
| | Reply
Post ID: @lat+FPbAJGB

Post a reply

: