Dassault Systemes
Adboxers Interview Questions and Answers
Q1. 3 Bulbs 3 switches, how do you know which is for what without seeing
You can turn on one switch for a few minutes, turn it off and turn on another switch. The remaining switch will be for the third bulb.
Turn on switch 1 and leave it on for a few minutes
Turn off switch 1 and turn on switch 2
Leave switch 2 on for a few minutes
Turn off switch 2 and turn on switch 3
The bulb that is off and warm to the touch is connected to switch 1
The bulb that is on is connected to switch 2
The bulb that is off and cold to the touch is connected to switch 3
Q2. Puzzles, cake cut 3 times into 8 equal pieces how
Cake can be cut into 8 equal pieces by making 3 cuts.
Make two cuts to divide the cake into quarters, then make a third cut through all quarters to get 8 equal pieces.
Each cut should be made perpendicular to the previous cut.
The size of the cake does not matter as long as it is a cylindrical or rectangular shape.
Q3. Write the program for singleton design pattern
Singleton design pattern ensures only one instance of a class is created and provides a global point of access to it.
Create a private constructor to prevent direct instantiation of the class
Create a private static instance of the class
Create a public static method to access the instance
Ensure thread safety by using synchronized keyword or static initialization block
Example: Database connection manager
Q4. Sort the list of alphanumeric values
Sort a list of alphanumeric values.
Use a sorting algorithm to sort the array of strings.
If the values are case-insensitive, convert them to lowercase before sorting.
If the values contain numbers, use a natural sorting algorithm to sort them.
If the values contain special characters, consider their ASCII values while sorting.
Q5. Reverse a linked list
Reverse a linked list
Iteratively swap the next and previous pointers of each node
Recursively swap the next and previous pointers of each node
Use a stack to push each node and then pop them to create the reversed list
Q6. Make your own immutable class
An immutable class is a class whose instances cannot be modified after creation.
Make all fields private and final
Do not provide any setters
Make the class final so that it cannot be subclassed
If any mutable object is used as a field, return a copy of it instead of the original object
Interview Process at Adboxers
Reviews
Interviews
Salaries
Users/Month