is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.
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.
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.
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.
//Assumption : the input array is not empty
- shaliniselvaraj5 June 16, 2015//Assumption : the multiplication product does not exceed the integer max value
int[] A = { 2, 2, 3, 4, 5, 6, -1, -1 }; //input array
int B[] = null;
int product = 1;
int i = 0;
int zerocounter = 0;
while (i < A.length) { // Does input array have zero value?
if (A[i] == 0) {
zerocounter += 1; // if yes, how many zeroes?
} else {
product = product * A[i]; // multiply all other inputs
}
i++;
}
if (zerocounter <= 1) { // Does the input array have less than two zeroes?
B = new int[A.length]; // output array initialization
i = 0;
while (i < A.length) {
if (A[i] == 0) {
B[i] = product; // product of all non-zeroes
}else{
B[i] = product/A[i]; // product / ith input = product of all non-ith elements
}
i++;
}
}