Arrays Interview Questions
- You are given an array with integers between 1 and 1,000,000. One integer is in the array twice. How can you determine which one? Can you think of a way to do it using little extra memory.
- You are given an array with integers between 1 and 1,000,000. One integer is missing. How can you determine which one? Can you think of a way to do it while iterating through the array only once. Is overflow a problem in the solution? Why not?
- Returns the largest sum of contiguous integers in the array
Example: if the input is (-10, 2, 3, -2, 0, 5, -15), the largest sum is 8
int GetLargestContiguousSum(int* anData, int len)
- Implement Shuffle given an array containing a deck of cards and the number of cards. Now make it O(n).
- Return the sum two largest integers in an array
int SumTwoLargest(int* anData, int size)
- Sum n largest integers in an array of integers where every integer is between 0 and 9
int SumNLargest(int* anData, int size, int n)
Excellent . Zer eta definitly nire eskerrak eman nahi duzu duzu merezi!
can u provide me the answer for the above question please
cn i get the answers 4 dese questions……
can a get answers to above questions please
can i get answers to above questions
Excellent ! Can u please provide the answer for the above questions…. Thank you
i want to get the answer for the aboveouestion
Great questions. Can I get the answers for the above questions.
Can i get answers to above questions.