Mathworks interview experience Real time questions & tips from candidates to crack your interview

EDG Engineer

Mathworks
upvote
share-icon
4 rounds | 7 Coding problems

Interview preparation journey

expand-icon
Journey
Starting my software engineering career with a solid foundation in C++, I quickly realized the need to expand my skill set. I dove deep into algorithms and data structures, spending countless hours on coding platforms.
Application story
MathWorks visited my campus during placement season, presenting a great opportunity to apply for the EDG Engineer role. I submitted my application through my college's placement portal, where we were required to upload our resumes and complete an online form.
Why selected/rejected for the role?
I was selected for this role because all my rounds went well. From the online assessment to the managerial round, everything went smoothly.
Preparation
Duration: 1 month
Topics: DSA, C++, Problem Solving, System Design, OOPS
Tip
Tip

Tip 1: Practice on coding platforms.

Tip 2: Complete at least 3 projects.

Application process
Where: Campus
Eligibility: N/A
Resume Tip
Resume tip

Tip 1: Have at least 3 projects.

Tip 2: Avoid making any grammatical mistakes.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration90 minutes
Interview date8 Jul 2023
Coding problem2

1. Longest Substring Without Repeating Characters

Moderate
30m average time
65% success
0/80
Asked in companies
FreshworksQualcommAdobe

Given a string input of length n, find the length of the longest substring without repeating characters i.e return a substring that does not have any repeating characters.

Substring is the continuous sub-part of the string formed by removing zero or more characters from both ends.

Problem approach

Step 1: I identified that the problem requires finding the longest substring where no characters repeat. This led me to consider using a sliding window approach to efficiently track and update the substring as I iterate through the string.

Step 2: I initialized two pointers, start and end, both set to the beginning of the string. I also used a set to keep track of the characters in the current window and a variable to store the maximum length of substring found.

Step 3: I started expanding the window by moving the end pointer to the right and adding characters to the set. If a character was already in the set (indicating a repetition), I moved the start pointer to the right until the repeated character was removed from the set, thus maintaining the condition of no repeating characters.

Step 4: For each step, I updated the maximum length of the substring by comparing it with the length of the current window (end - start + 1).

Step 5: After processing all characters, I returned the maximum length as the result. This approach had a time complexity of O(n), where n is the length of the string, as each character is processed at most twice.

Try solving now

2. Longest Palindromic Substring

Moderate
20m average time
80% success
0/80
Asked in companies
MicrosoftCIS - Cyber InfrastructureGartner

You are given a string 'str' of length 'N'.


Your task is to return the longest palindromic substring. If there are multiple strings, return any.


A substring is a contiguous segment of a string.


For example :
str = "ababc"

The longest palindromic substring of "ababc" is "aba", since "aba" is a palindrome and it is the longest substring of length 3 which is a palindrome. 

There is another palindromic substring of length 3 is "bab". Since starting index of "aba" is less than "bab", so "aba" is the answer.
Problem approach

Step 1: I recognized that the problem involves finding the longest substring that reads the same forwards and backwards. This can be efficiently solved using the "Expand Around Center" approach.

Step 2: I decided to use the "Expand Around Center" technique, where each possible centre of a palindrome (both single characters and pairs of characters) is considered, and the palindrome is expanded around this centre to find the longest possible palindrome.

Step 3: For each character (and each pair of adjacent characters) in the string, I expanded outwards while the characters on both sides of the centre were equal. I kept track of the start and end indices of the longest palindrome found during these expansions.

Step 4: I implemented a helper function to expand around a given centre and another function to iterate through each character and pair of characters, calling the helper function to check and update the longest palindrome found.

Step 5: I returned the longest palindromic substring after processing all possible centres.

Try solving now
02
Round
Medium
Video Call
Duration45 minutes
Interview date15 Jul 2023
Coding problem3

1. Generate all parenthesis

Moderate
30m average time
85% success
0/80
Asked in companies
FacebookExpedia GroupLinkedIn

You are given an integer 'N', your task is to generate all combinations of well-formed parenthesis having ‘N’ pairs.


A parenthesis is called well-formed if it is balanced i.e. each left parenthesis has a matching right parenthesis and the matched pairs are well nested.


For Example:

For ‘N’ = 3,
All possible combinations are: 
((()))
(()())
(())()
()(())
()()()
Problem approach

Step 1: I recognized that this problem involves generating all possible combinations of well-formed parentheses. Each combination must be balanced, meaning that every opening parenthesis ( must have a corresponding closing parenthesis ) and must be correctly nested.

Step 2: I decided to use a backtracking approach to generate the combinations. This technique involves building the solution incrementally and backtracking when a partial solution cannot be extended to a complete solution.

Step 3: I defined a recursive function that keeps track of the number of opening and closing parentheses used so far and the current combination of parentheses being formed. The recursion would build the combination step by step:

Base Case: When the combination length equals 2 * n (i.e., all pairs of parentheses are used), the combination is added to the result list.
Recursive Case: Add an opening parenthesis if we haven't used all n opening parentheses yet. Add a closing parenthesis if it does not exceed the number of opening parentheses used.
Step 4: I implemented the function using a helper function to handle the recursive backtracking and collecting results.

Try solving now

2. Operating System

  1. What is virtual memory? (Learn)
  2. Difference between binary and counting semaphores? (Learn)
  3. Difference between paging and segmentation? (Learn)

3. DBMS

  1. Define Normalization. (Learn)
  2. Define Acid properties. (Learn)
03
Round
Medium
HR Round
Duration45 minutes
Interview date15 Jul 2023
Coding problem1

Hiring manager

1. HR Questions

  1. Tell me about yourself and your background.
  2. Why are you interested in this role and our company?
  3. What projects or coursework have you worked on that are relevant to this position?
  4. How do you approach problem-solving when faced with a new challenge?
  5. Can you describe a time when you worked on a team project? What was your role and how did you contribute?
  6. How do you prioritize tasks and manage your time when working on multiple projects or assignments?
  7. What are your strengths and weaknesses? How are you working to improve your weaknesses?
  8. How do you stay current with new technologies and industry trends?
04
Round
Medium
HR Round
Duration45 minutes
Interview date15 Jul 2023
Coding problem1

HR Round

1. HR Questions

  1. Tell me about yourself.
  2. Why did you choose your field of study, and how does it relate to this role?
  3. What interests you about this company and the position you are applying for?
  4. Can you describe a time when you faced a difficult situation and how you handled it?
  5. How do you manage stress and pressure, especially when facing tight deadlines?

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 recursion?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 2
6 rounds | 10 problems
Interviewed by Mathworks
0 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 4 problems
Interviewed by Mathworks
1261 views
0 comments
0 upvotes
company logo
EDG Associate
5 rounds | 4 problems
Interviewed by Mathworks
1246 views
0 comments
0 upvotes
company logo
SDE - Intern
1 rounds | 3 problems
Interviewed by Amazon
3320 views
0 comments
0 upvotes