ANSYS, Inc. interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

ANSYS, Inc.
upvote
share-icon
3 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: System Design, core C++, Algorithms, Data Structures, DBMS
Tip
Tip

Tip 1 : Brush Up on Computer Science Fundamentals
Tip 2 : Prepare a Brief Self-Introduction

Application process
Where: Campus
Eligibility: 7.5 CGPA
Resume Tip
Resume tip

Tip 1 : Do not put fake resume
Tip 2 : Writing internship project helps.

Interview rounds

01
Round
Easy
Online Coding Interview
Duration90 minutes
Interview date1 Aug 2020
Coding problem2

Timing - 10AM-11:30AM
Online proctored test

1. Right View

Moderate
35m average time
65% success
0/80
Asked in companies
AmazonAdobeUber

You have been given a Binary Tree of integers.

Your task is to print the Right view of it.

The right view of a Binary Tree is a set of nodes visible when the tree is viewed from the Right side and the nodes are printed from top to bottom order.

Problem approach

The problem can be solved using simple recursive traversal. We can keep track of level of a node by passing a parameter to all recursive calls. keep track of maximum level also. And traverse the tree in a manner that right subtree is visited before left subtree. Whenever we see a node whose level is more than maximum level so far, we print the node because this is the last node in its level.

Try solving now

2. 0 1 Knapsack

Easy
15m average time
85% success
0/40
Asked in companies
CIS - Cyber InfrastructureOlaTwitter

A thief is robbing a store and can carry a maximal weight of W into his knapsack. There are N items and the ith item weighs wi and is of value vi. Considering the constraints of the maximum weight that a knapsack can carry, you have to find and return the maximum value that a thief can generate by stealing items.

Problem approach

Simple DP problem:
The state DP[i][j] will denote maximum value of ‘j-weight’ considering all values from ‘1 to ith’. 
So I considered ‘wi’ (weight in ‘ith’ row) we can fill it in all columns which have ‘weight values > wi’. Now two possibilities can take place: 

Fill ‘wi’ in the given column.
Do not fill ‘wi’ in the given column

Took maximum of these two possibilities

Try solving now
02
Round
Medium
Video Call
Duration45 minutes
Interview date4 Aug 2020
Coding problem2

Timing : 4PM-5PM
Environment - Online

There was a panel of 3 interviewers

1. C++ Question

find size of array in C/C++ without using sizeof ?We cannot use any standard function

Problem approach

I didn't knew answer at first. Then interviewer told me to think in address direction and with their incremental help I was able to give perfect solution.
Initialize the elements of the array.
&a => This is the pointer to array which points at the same memory address as a.
&a + 1 => It points at the address after the end of the array.
*(a+1) => Dereferencing to *(&a + 1) gives the address after the end of the last element.
*(a+1)-a => Subtract the pointer to the first element to get the length of the array.
Print the size.

2. DBMS based question

Explain how indexing in DB works using B+ trees?

Problem approach

Tip 1 : Read Concepts of DBMS thoroughly
Tip 2 : Practice B+ tress from DS perspective as well

03
Round
Easy
Video Call
Duration45 mintues
Interview date5 Aug 2020
Coding problem1

Timing - 11AM-12:15PM
Environment - online video call

Again there was a panel of 2 senior engineers

1. Maximum Path Sum

Easy
0/40
Asked in companies
Goldman SachsMicrosoftOracle

You are given an n-ary tree consisting of ‘N’ nodes. Your task is to return the maximum sum of the path from the root to the leaf node.

For example:
For the given tree:

The path 1 -> 3 -> 7 produces the maximum i.e, 11.
Problem approach

I had to construct n-ary tree myself.
Then I used a DFS traversal starting from the root
maximum value among all maximum path sums is the required answer.

Try solving now

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

What is the purpose of the return keyword?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
8770 views
0 comments
0 upvotes
Analytics Consultant
3 rounds | 10 problems
Interviewed by ZS
937 views
0 comments
0 upvotes
company logo
SDE - Intern
1 rounds | 3 problems
Interviewed by Amazon
3406 views
0 comments
0 upvotes
company logo
SDE - 2
4 rounds | 6 problems
Interviewed by Expedia Group
2660 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
114869 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
58031 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
35057 views
7 comments
0 upvotes