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.
public static void main(String[] args) {
- Chaitanya March 03, 2015int a[] = {0,3,6,9,12,15};
int b[] = {2,4,6,8,10};
int c[] = {1,2,3,4,5,6};
//Create a new array that is supposed to hold the final output of sorted values across the 3 arrays.
int d[] = new int[a.length+b.length+c.length];
//Copy the first array as it is (this can be any array)
for (int i=0;i<a.length;i++) {
d[i] = a[i];
}
//For the remaining two arrays, add element from each of the two arrays into the final array via insertion sort.
merge(b,d,a.length);
merge(c,d,a.length+b.length);
for (int i=0;i<d.length;i++) {
System.out.print(d[i]+" ");
}
}
//Adds the elements from fromArray into the final toArray via insertion sort.
public static void merge(int fromArray[], int toArray[], int currentIndex) {
int val = 0;
for (int i=0;i<fromArray.length;i++) {
val = fromArray[i];
int j = currentIndex;
while (j > 0 && toArray[j-1] > val) {
toArray[j] = toArray[j-1];
j--;
}
toArray[j] = val;
currentIndex++;
}
}