Offline Coding Round question: An array was given and if( a[i] + a[j] ) is prime then it is said to be bad pair. We need to subtract minimum no. of elements from a such that there should not be any bad pair and return the final total no. of elements present in a.
Program Specialist Interview Questions
1,810 program specialist interview questions shared by candidates
An evil scientist has developed an injection that induces insatiable hunger in a fish. On giving this injection, a fish of size x can eat another fish of smaller size y (y < x) and become a fish of size x + y retaining this hunger. An aquarium has a number of fishes of various sizes. The scientist introduces an injected fish into this aquarium with an objective that eventually only 1 fish remains. In order to achieve this, the scientist is allowed only two types of moves: either add a normal fish of any size or remove an existing normal fish from the aquarium. Given the sizes of other fishes in the aquarium and the size of injected fish, write a program to determine the minimum number of moves needed by the scientist to achieve his objective. For example, suppose there are 5 fishes in the aquarium, the injected fish is of size 10 and the other fishes are of sizes 9, 20, 25, and 100. To ensure that only 1 fish remains in the aquarium the scientist needs to remove the fish of size 100 and add a fish of size 3. So the output is 2. The sequence of steps is shown below. The sizes of fishes in the aquarium at each step are shown in curly braces. The highlighted number is the size of the injected fish.
Why do you want to work at Ultimate Software?
What motivated me to apply for the position?
What are some of your strengths (what value) do you have to add for this position?
There were no interview questions.
Would you like to work at a job that is offering a lot of overtime?
When was a time you faced a difficult task and how did you approach and/ or resolve it?
What do you know about the company?
Case study around solving for delayed delivery
Viewing 271 - 280 interview questions