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

Dassault System Interview Experience Round 1

Java Developer Role

Firstly a brief introduction (education, experience, projects, skill-set and achievements), Interviewer asked for the roles and responsibility in current organization, after that he jumped to coding questions,

Coding Questions

He asked 2 questions,

First coding question

Q1. Print inverted pyramid pattern (easily solved),

Second coding question is based on string,

Q2. Write a function reshape(n, str) , in which you have to insert '/n' after n character of the string.

Example: reshape (3, "abc de fghij") , this should return "abc/ndef/nghi/nj", (able to solve)

Logical Reasoning questions:

Q1. You are given 9 balls, out of them 8 balls weight 1kg and 1 ball weight 940gm. Using a weighing scale (like tarazu) in minimum number of chances you need to identify which 1 ball weight 940gm. ( I figure out in 3 moves, so he asked can we do better, then I answer 2 moves and explain the approach)

Q2. It was similar to "Tough Two Jug Measuring Puzzle" , I was given one 3 litre mug and one 5 litre mug and I have to measure 4 litre using these mugs.

Other Questions:

OOPs related questions,

How garbage collection works and when garbage collector start collecting garbage

What is recursion etc

ADD COMMENTlink 2.1 years ago John 910
1
Entering edit mode

Logical Reasoning Q1 Answer

Assuming Weighing Scale is like the picture below:

enter image description here

Step 1

  • Divide the balls in groups of 3
  • Put any two groups on the weighing scale
  • If any one of the groups has less weight, separate out that group of 3
  • If they have the same weight, separate out the group of 3 balls that was not put on the weighing scale.

Step 2

  • Pick any two out of those three balls and put them on weighing scale
  • If one of them has less weight, that is the odd ball out.
  • If both of them have equal weight, the ball that was left out is the odd one out.
ADD COMMENTlink 2.1 years ago admin 1.6k

Login before adding your answer.

Similar Posts
Loading Similar Posts