Question: Dassault Systems, Interview Experience for Java Developer Role, 12th November 2022
0
Entering edit mode

Round 1 interview experience at Dassault Systems

Round started with my introduction and my past experience, about my projects.

There were many questions asked related to my projects and tech stack involved.

After this, I was asked about oops concept in Java.

Few general questions on java.

I was given 2 snippets (Java) to predict the output.

General question why this is the output, What can we change to get a different output.

Coding Question

At last I was given a coding ques, which goes a follows -

Question

Click here to Practice

Integer array as input, Count the unique digit from the array.

Using those digits make the largest number possible.

Sample input - 1,11,33,98,58,88

Unique digits - 1,3,5,8,9

Sample output - 98531 (Largest Number)

Questions regarding code re-usability were asked.

No logical reasoning ques were asked for now.

Round 2 will be updated.

ADD COMMENTlink 2.1 years ago John 910
1
Entering edit mode

Coding Question


Overview

  • Find all the unique digits in the array and form the largest number possible using those digits.

Approach

  • Store the frequency of all the digits and then form the largest number using the digits having a frequency of more than 1.

  • For example, for the array [1, 11, 33, 98, 58, 88] the frequency array will be freq[10]={0,3,0,2,0,1,0,0,4,1}. So the largest number will be 98531.

Complexity

Time Complexity: O(N), N is the size of the array.

ADD COMMENTlink 2.0 years ago Akash 240

Login before adding your answer.

Similar Posts
Loading Similar Posts