Facebook Interview Question
349 Interview Reviews |
Back to all Facebook Interview Questions & Reviews
Interview questions and reviews posted anonymously by interview candidates
Interview Question for Intern at Facebook:
given two sorted arrays, please merge them into a single array and still sorted. how to determine the size of array?
Helpful Question?
Yes |
No
Inappropriate?
Answers & Comments (2)
template <size_t N>
void p(int (&arr)[N]) {
cout << N << endl;
}
int main() {
int arr[10];
p(arr);
}
Helpful Answer?
Yes |
No
Inappropriate?
To comment on this
question,
Sign In with Facebook or
Sign Up



0 of 0 people found this helpful
by Interview Candidate:
But I got stuck at how to determin the size of array? If using the pointer (*p )which pointing the head of the array as the input, how do we compute the size of the array?