Write a function in Java that will take a sorted array of ints, possibly with duplicates, and compact the array removing all the duplicate numbers. That is, if the contains the numbers - 1, 3, 7, 7, 8, 9, 9, 9, 10, then when the function returns, the contents should be - 1, 3, 7, 8, 9, 10. Be sure your answer is as efficient as possible. Describe the efficiency of your algorithm using big O notation.
Intern Interviews
Intern Interview Questions
An intern works in a professional environment to gain practical, meaningful, and work-related experience in their chosen field or career. Interns are trainees who sign up to work for an organization for a short period of time to gain experience. Interns may be unpaid, partially paid, or paid.
Top Intern Interview Questions & How To Answer
Question #1: Can you tell me about a time you failed something, either in school or at a job?
Question #2: How did you land in this particular field?
Question #3: What do you hope to gain from this experience?
248,188 intern interview questions shared by candidates
how would you design how a cellphone implements its contact list when you press a certain letter. For example, If you press M it will tell you all the names starting with M. then if you press MI it will tell you all names starting from MI and so forth....
Given a set of points (x,y) and an integer "n", return n number of points which are close to the origin
Given a number n, give me a function that returns the nth fibonacci number. Running time, space complexity, iterative vs. recursive.
When was a time in your life where you received criticism and how did you react?
No tough questions were asked. They just wanted to know if I could accept it and meet their deadlines.
How do you find three numbers that sum to 0? (in a list). Now can you do it under O(n^3)?
What is the sum of the square root of every number from 1 to 100?
Swap two variables without using a temp.
The interviewer gives you 100 blank cards, and you can write a single positive integer on each card. The interviewer looks at the cards when you're done (so he knows the probability distribution of the deck), then shuffles the deck. The interviewer guesses the top card of the deck, and if he's right, he makes in $ the number written on the card. What numbers should you write on the cards to minimize the expected return of the interviewer?
Viewing 181 - 190 interview questions