i
Ansys Software Private Limited
Filter interviews by
Clear (1)
I applied via Campus Placement and was interviewed before Oct 2022. There were 2 interview rounds.
Coding on oops multiple choice questions
To find leaf node of binary tree, traverse the tree and check if node has no children.
Traverse the binary tree using depth-first search or breadth-first search
Check if a node has no left or right child, then it is a leaf node
Repeat the process for all nodes until all leaf nodes are found
To get left view, right view, and top view of a binary tree, perform level order traversal and keep track of the first node encountered at each level.
Perform level order traversal of the binary tree
Keep track of the first node encountered at each level for left view
Keep track of the last node encountered at each level for right view
For top view, use a map to store horizontal distance and node pairs
Top trending discussions
I was interviewed in Jul 2017.
Code to print * in five consecutive lines
Use a loop to iterate five times
Inside the loop, print a string containing a single * character
Code to calculate number of bounces a ball goes through until it comes to rest.
Use a loop to simulate the bounces until the ball stops bouncing
Calculate the height of each bounce using the given formula
Keep track of the number of bounces in a counter variable
The best and less time consuming way to calculate factorial of a number is using iterative approach.
Iteratively multiply the number with all the numbers from 1 to the given number
Start with a result variable initialized to 1
Multiply the result with each number in the range
Return the final result
Code to find factorial using function recursion
Define a function that takes an integer as input
Check if the input is 0 or 1, return 1 in that case
Otherwise, call the function recursively with input-1 and multiply it with the input
posted on 10 May 2015
Locate sum of 2 numbers in a linear array (unsorted and sorted) and their complexities
For unsorted array, use nested loops to compare each element with every other element until the sum is found
For sorted array, use two pointers approach starting from the beginning and end of the array and move them towards each other until the sum is found
Complexity for unsorted array is O(n^2) and for sorted array is O(n)
Pointers are used to manipulate memory addresses and values in C++. Increment/decrement, address of and value at operators are commonly used.
Incrementing a pointer moves it to the next memory location of the same data type
Decrementing a pointer moves it to the previous memory location of the same data type
The address of operator (&) returns the memory address of a variable
The value at operator (*) returns the value sto
To determine if a point is inside or outside a rectangle, we check if the point's coordinates fall within the rectangle's boundaries.
Check if the point's x-coordinate is greater than the left edge of the rectangle
Check if the point's x-coordinate is less than the right edge of the rectangle
Check if the point's y-coordinate is greater than the top edge of the rectangle
Check if the point's y-coordinate is less than the b...
To find line that divides rectangle into 2 equal halves through a point inside it.
Find the center of the rectangle
Draw a line from the center to the given point
Extend the line to the opposite side of the rectangle
The extended line will divide the rectangle into 2 equal halves
There are multiple combinations of 8-bit and 16-bit signed numbers. How many such combinations are possible?
There are 2^8 (256) possible combinations of 8-bit signed numbers.
There are 2^16 (65,536) possible combinations of 16-bit signed numbers.
To find the total number of combinations, we can add the number of combinations of 8-bit and 16-bit signed numbers.
Therefore, the total number of possible combinations is 256 +
Find duplicates in an array of elements in 0(n) time and 0(1) space.
Use the property of inputs to your advantage
Iterate through the array and mark elements as negative
If an element is already negative, it is a duplicate
Return all the negative elements as duplicates
I applied via Referral and was interviewed in Mar 2024. There was 1 interview round.
To connect to the backend, you can use APIs, database connections, or web services.
Use APIs to send and receive data between the frontend and backend
Establish database connections to retrieve and store data
Utilize web services for communication between different systems
I applied via Campus Placement and was interviewed in Feb 2021. There were 4 interview rounds.
To find the middle of a linked list in one iteration, use two pointers with different speeds.
Initialize two pointers, one slow and one fast, both pointing to the head of the linked list.
Move the slow pointer one step at a time and the fast pointer two steps at a time.
When the fast pointer reaches the end of the linked list, the slow pointer will be at the middle node.
A binary tree is a data structure consisting of nodes, where each node has at most two children.
Binary tree is used to represent hierarchical relationships between nodes
Traversal of binary tree can be done in three ways: inorder, preorder, postorder
Binary search tree is a type of binary tree where left child is smaller and right child is greater than parent
Balanced binary tree has height difference of at most 1 between...
It was like 5 MCQ and two coding questions with difficult level of moderate
React components go through various stages in their life cycle, from initialization to destruction.
Initialization: Component is created and initialized with default props and state.
Mounting: Component is rendered on the DOM for the first time.
Updating: Component re-renders when props or state change.
Unmounting: Component is removed from the DOM.
Examples: componentDidMount() for mounting, componentDidUpdate() for updati
I applied via Campus Placement and was interviewed in Oct 2023. There were 4 interview rounds.
Topics: maps, sorting and simple DSA question
A linked list is a data structure where each element points to the next element in the sequence.
Linked list is stored in memory as nodes, where each node contains data and a reference to the next node.
Examples of linked-list include a singly linked list, doubly linked list, and circular linked list.
In a singly linked list, each node points to the next node. In a doubly linked list, each node points to both the next and
ML models are built by collecting and preparing data, selecting a model, training the model on the data, and evaluating its performance.
Collect and prepare data by cleaning, transforming, and encoding it
Select a model based on the problem at hand (e.g. regression, classification, clustering)
Train the model using algorithms like linear regression, decision trees, or neural networks
Evaluate the model's performance using ...
Arrays store elements in contiguous memory locations, while linked lists store elements in nodes with pointers to the next node.
Arrays have fixed size, while linked lists can dynamically grow or shrink.
Accessing elements in arrays is faster (O(1)), while accessing elements in linked lists is slower (O(n)).
Inserting or deleting elements in arrays can be inefficient, as it may require shifting elements, while in linked l...
Return a string containing the first occurrence of characters in the input string.
Create an empty string to store the result.
Iterate through each character in the input string.
If the character is not already in the result string, add it to the result string.
Return the result string.
One of the hardest DSA questions I have done involved implementing a complex graph traversal algorithm.
The question required understanding of graph data structures and algorithms.
I had to implement a depth-first search or breadth-first search algorithm.
The question may have involved finding the shortest path in a weighted graph.
I had to consider edge cases and optimize the algorithm for efficiency.
2 hours of duration and medium level leetcode questions
OS stands for Operating System. It is a software that manages computer hardware and provides services for computer programs.
OS is the software that acts as an intermediary between computer hardware and user applications.
It manages computer resources such as memory, processors, devices, and file systems.
Examples of popular operating systems include Windows, macOS, Linux, and Android.
Deadlock can be avoided by implementing proper resource allocation strategies and using techniques like deadlock prevention, avoidance, detection, and recovery.
Implement proper resource allocation strategies such as resource ordering, wait-die, wound-wait, etc.
Use techniques like deadlock prevention by ensuring that the system never enters a deadlock state, avoidance by ensuring that the system does not enter an unsafe...
I was interviewed in Jan 2024.
Basic code example using an array of strings
Declare an array of strings in the preferred programming language
Initialize the array with some string values
Access and manipulate elements in the array as needed
A simple program to print 'Hello, World!'
Create a new file with a .py extension
Write 'print('Hello, World!')' inside the file
Save the file and run it using a Python interpreter
based on 1 interview
Interview experience
R&D Engineer
52
salaries
| ₹0 L/yr - ₹0 L/yr |
Applications Engineer
36
salaries
| ₹0 L/yr - ₹0 L/yr |
Senior R&D Engineer
33
salaries
| ₹0 L/yr - ₹0 L/yr |
Senior Application Engineer
26
salaries
| ₹0 L/yr - ₹0 L/yr |
Technical Support Engineer
24
salaries
| ₹0 L/yr - ₹0 L/yr |
Autodesk
Cadence Design Systems
Synopsys
Siemens