Dassault Systemes
10+ Amazon Interview Questions and Answers
Q1. Implement C string and make custom string class. Why we use reference in copy constructor
Custom string class implementation with C string and explanation of using reference in copy constructor.
C string can be implemented using char arrays and functions like strcpy, strlen, etc.
Custom string class can be implemented using dynamic memory allocation and member functions for string manipulation.
References in copy constructor are used to avoid unnecessary copying of objects, improving performance and memory efficiency.
Q2. Product of two vote eligible people is x and then what will bethe individual's age
The age of the individuals cannot be determined based on the given information.
The product of two vote eligible people does not provide any information about their individual ages.
Age is not a factor in determining the product of two numbers.
Additional information about the individuals' ages or their relationship to the product is needed.
Q3. 1. Implement 4x4 matrix multiplication with operator overloading in cpp. 2. Bitwise XOR operation of two numbers
Implement matrix multiplication and bitwise XOR operation in C++.
For matrix multiplication, define a Matrix class with overloaded * operator.
For bitwise XOR operation, use the ^ operator between two integers.
Ensure the dimensions of matrices are compatible for multiplication.
Handle edge cases like empty matrices or different dimensions.
Example: Matrix A(4, 4); Matrix B(4, 4); Matrix C = A * B;
Example: int result = num1 ^ num2;
Q4. 2. Shortest distance between 2 points on a 3d cubical surface
The shortest distance between 2 points on a 3D cubical surface can be calculated using the Manhattan distance formula.
Calculate the absolute difference between the x, y, and z coordinates of the two points.
Sum up the absolute differences to get the Manhattan distance.
Manhattan distance = |x2 - x1| + |y2 - y1| + |z2 - z1|
Example: If point A is (1, 2, 3) and point B is (4, 5, 6), the Manhattan distance would be |4-1| + |5-2| + |6-3| = 9.
Q5. 1. Length of string wrapped around a cylindrical surface
The length of string wrapped around a cylindrical surface can be calculated using the formula 2πr, where r is the radius of the cylinder.
The formula to calculate the length of string wrapped around a cylindrical surface is 2πr.
For example, if the radius of the cylinder is 5 cm, the length of the string wrapped around it would be 2π(5) = 10π cm.
Q6. Diff btw 32 bit and 64 bit OS
32-bit OS can only address up to 4GB of RAM, while 64-bit OS can address much more.
32-bit OS can only address up to 4GB of RAM, while 64-bit OS can address much more
64-bit OS allows for larger file sizes and better performance
64-bit OS is more secure due to enhanced security features
64-bit OS is required to run certain modern software and games
Q7. Linked List Implementation
Linked list is a data structure where each element points to the next element in the sequence.
Nodes contain data and a reference to the next node
Insertion and deletion can be done efficiently
Traversal starts from the head node
Q8. Projectionofvector on another
Projection of one vector onto another is a way to find the component of one vector in the direction of another vector.
To project vector A onto vector B, you can use the formula: projB(A) = (A dot B / ||B||^2) * B
The dot product of two vectors is calculated by multiplying their corresponding components and adding the results.
The magnitude of a vector can be found using the formula: ||V|| = sqrt(Vx^2 + Vy^2)
Example: If vector A = [3, 4] and vector B = [1, 2], the projection of ...read more
Q9. why Dassault system
Dassault Systemes is a global leader in 3D design software, 3D Digital Mock Up and Product Lifecycle Management solutions.
Dassault Systemes offers cutting-edge technology and innovative solutions for software development.
They have a strong reputation in the industry for providing high-quality products and services.
Working at Dassault Systemes provides opportunities for professional growth and development.
Their focus on research and development ensures that employees are worki...read more
Q10. Sort array without using method
Sort array without using method
Iterate through the array and compare each element with the next one
Swap elements if they are in the wrong order
Repeat the process until the array is fully sorted
Q11. Reverse a String
Reverse a given string
Use a loop to iterate through the characters of the string
Append each character to a new string in reverse order
Return the reversed string
Q12. Puzzle of 3 jar
Three jars puzzle involves transferring water between jars to measure a specific amount.
Fill the 5L jar, pour it into the 3L jar, leaving 2L in the 5L jar.
Empty the 3L jar, pour the remaining 2L from the 5L jar into the 3L jar.
Fill the 5L jar again, pour water into the 3L jar until it is full (1L remaining in the 5L jar).
Q13. Create binary tree
A binary tree is a data structure where each node has at most two children.
Start by creating a Node class with left and right child pointers.
Implement methods to insert, search, and delete nodes in the tree.
Consider different traversal methods like inorder, preorder, and postorder.
Interview Process at Amazon
Top Software Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month