Problem Solving Interview Report
- -1of 1 vote
AnswersLets say you have a number n and there is an array whose size is n-1. Array contains numbers in between 1 to n and all unique numbers.
- learner123 June 05, 2014 in United States
But one number is missing from the array as its size is n-1. Can you find that missing number in the array?
Input Spec: n = 5
int arr[4] = {3, 1, 4, 5};
Output: 2| Report Duplicate | Flag | PURGE
Problem Solving - -1of 1 vote
AnswersLets say you have a number n and there is an array that has size = n+1.There is one element repeated in the array. Can you find that number?
- learner123 June 05, 2014 in United States
Input spec: n = 5
int arr[6] = {3, 1, 4, 4, 5, 2};
Output: 4| Report Duplicate | Flag | PURGE
Problem Solving
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.