Dassault Systemes
10+ Onestrategy Websolutions 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
Q7. how is a python list implemented
A Python list is implemented as a dynamic array that can resize itself as needed.
Python lists are implemented as dynamic arrays, allowing for efficient insertion and deletion operations.
Lists in Python can hold elements of different data types.
Lists can be accessed using index values, starting from 0.
Example: my_list = [1, 'hello', True]
Q8. explain exception handling
Exception handling is a mechanism to handle runtime errors in a program to prevent it from crashing.
Exceptions are objects that represent errors or unexpected events in a program.
Try block is used to enclose the code that might throw an exception.
Catch block is used to handle the exception if it occurs.
Finally block is used to execute code regardless of whether an exception is thrown or not.
Throw keyword is used to manually throw an exception.
Example: try { // code that might...read more
Q9. Explain Oops concept
Oops concept stands for Object-Oriented Programming. It is a programming paradigm based on the concept of objects.
Oops concept involves the use of classes and objects
It emphasizes on encapsulation, inheritance, polymorphism, and abstraction
Encapsulation is the bundling of data with the methods that operate on that data
Inheritance allows a class to inherit properties and behavior from another class
Polymorphism allows objects to be treated as instances of their parent class
Abst...read more
Q10. Deliver a Presentation for an Hour
Deliver a presentation for an hour
Start with an engaging introduction to grab the audience's attention
Organize the content into clear sections with key points
Use visuals like slides or props to enhance understanding
Encourage audience participation through questions or activities
Conclude with a summary of key takeaways and open the floor for questions
Q11. What is 1NF 2NF 3NF
1NF, 2NF, and 3NF are different normal forms in database normalization, ensuring data integrity and reducing redundancy.
1NF (First Normal Form) - Each column in a table must contain atomic values. No repeating groups or arrays.
2NF (Second Normal Form) - Meets 1NF and all non-key attributes are fully functional dependent on the primary key.
3NF (Third Normal Form) - Meets 2NF and there is no transitive dependency between non-prime attributes.
Top HR Questions asked in Onestrategy Websolutions
Interview Process at Onestrategy Websolutions
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month