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.
#include <iostream>
- ltcshuai91 September 16, 2014#define MAX 100
using namespace std;
void getLgst(int * arr, int n){
int i = 0;
int mark[MAX] = {0};
int max = 0, max_temp = 0, start = 0, start_temp=0, end = 0;
while (i<n) mark[*(arr+i++)] = 1;
i = 0;
while (i<MAX){
if (mark[i] and mark[i+1])
max_temp += i++;
else if (mark[i] and !mark[i+1]){
if(max<max_temp+i){
max = max_temp+i;
end = i++;
start = start_temp;
}
else
i++;
}
else{
max_temp = 0;
i++;
if(mark[i])
start_temp = i;
}
}
cout<<start << " "<< end<<" "<<max<<endl;
}
int main()
{
cout << "Hello World" << endl;
int array[7] = {1,6,10,4,7,9,5};
getLgst(array, 7);
return 0;
}
Space can me further limited by using map.