Google Interview Question
1,223 Interview Reviews |
Back to all Google Interview Questions & Reviews
Interview questions and reviews posted anonymously by interview candidates
Interview Question for Software Engineer Intern at Google:
Given an array of numbers, there is one number that has a duplicate. How would you find the number?
Helpful Question?
Yes |
No
Inappropriate?
Answers & Comments (4)
if previous index == current index
return index.
Helpful Answer?
Yes |
No
Inappropriate?
Helpful Answer?
Yes |
No
Inappropriate?
you can sort in nLog(n) time and in the sort, if you see two numbers that are equal, just save that number and return just that number. pure nlogn optimal
Helpful Answer?
Yes |
No
Inappropriate?
To comment on this
question,
Sign In with Facebook or
Sign Up
1 of 1 people found this helpful
by Interview Candidate: