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

SDE - 1

MAQ Software
upvote
share-icon
3 rounds | 8 Coding problems

Interview preparation journey

expand-icon
Journey
During my B.tech, our seniors informed us how vital DSA is to crack placements. Therefore, I started practicing DSA from Codestudio right from my second year. I practice a lot of questions. Also, I focused on core subjects as well correctly.
Application story
The HR contacted me through email. I was asked to appear for the coding test. I applied through the link provided, and further rounds were carried out.
Why selected/rejected for the role?
I solved almost all the questions asked me during the selection process. I have done a lot of coding practice on Competitive programming sites and built a deep understanding of programming skills. My good communication skills are also one reason for my selection.
Preparation
Duration: 3 months
Topics: Topics: DBMS, Data Structures and Algorithms , OOP, Maths puzzles, Aptitude
Tip
Tip

Tip 1: Do a lot of hard work and practice Data Structures and Algorithm based questions
Tip 2: I recommend Coding Ninjas and Geeks For Geeks for interview preparation.

Application process
Where: Referral
Eligibility: Above 7 CGPA
Resume Tip
Resume tip

Tip 1 : Make your resume short. 
Tip 2 : Try to make it one page only, and do mention all your skills that you are confident of in your resume.

Interview rounds

01
Round
Medium
Video Call
Duration60 minutes
Interview date3 Apr 2022
Coding problem2

1. Maximum Frequency Number

Easy
10m average time
90% success
0/40
Asked in companies
PayPalHSBCWalmart

Ninja is given an array of integers that contain numbers in random order. He needs to write a program to find and return the number which occurs the maximum times in the given input. He needs your help to solve this problem.

If two or more elements contend for the maximum frequency, return the element which occurs in the array first i.e. whose index is lowest.

For example,

For 'arr' = [ 1, 2, 3, 1, 2]. you need to return 1.
Problem approach

Ninja is given an array of integers that contain numbers in random order. He needs to write a program to find and return the number which occurs the maximum times in the given input. He needs your help to solve this problem.
If two or more elements contend for the maximum frequency, return the element which occurs in the array first i.e. whose index is lowest.

Try solving now

2. Tiling Problem

Hard
45m average time
0/120
Asked in companies
OptumOlaAdobe

You have been given a board where there are '2' rows and 'N' columns. You have an infinite supply of 2x1 tiles, and you can place a tile in the following ways:

1. Horizontally as 1x2 tile
2. Vertically as 2x1 tile

Count the number of ways to tile the given board using the available tiles.

Note :
The number of ways might be large so output your answer modulo 10^9 + 7.

Here an example of tile and board for 'N' = 4 :

Tiling Example

Problem approach

I have done this problem earlier so got the DP based approach during the test and this approach passed all the test cases.

Try solving now
02
Round
Medium
Video Call
Duration60 minutes
Interview date7 Apr 2022
Coding problem2

1. Common Digit Longest Subsequence

Moderate
31m average time
0/80
Asked in companies
OptumLinkedInAmazon

You have been given an array of 'N' Integers. Find the length of the longest subsequence such that each adjacent element of the subsequence has at least one digit in common.

Note :
A sequence 'A' is a subsequence of a sequence 'B' if 'A' can be obtained from 'B' by deletion of several (possibly, zero) elements. For example, [3,1] is a subsequence of [3,2,1] and [4,3,1], but not a subsequence of [1,3,3,7] and [3,10,4].
Problem approach

I initially tried a 2D DP solution where dp[i][j] indicates the length of the longest sequence with ending at i containing j as a digit. It’s a N X 10 DP matrix. The interviewer asked me why I needed a 2D DP solution and I struggled to convince him. I wrote the code for it. It wasn’t completely correct. I was missing something. After thinking for a while I narrowed down to a solution containing only 10 elements dp[0], dp[1], dp[2].. dp[9] which is updated every time I see a new number. I take a number, I go through all digits in the number and find value = 1 + max(dp[d] for all digits d in the number). Set this value to dp[d] for all digits in the number. He gave a hint to take the max and finally gave a solution to the interviewer and he was satisfied with that solution.

Try solving now

2. Sort 0 1 2

Easy
22m average time
0/40
Asked in companies
AmazonOracleWalmart

You have been given an integer array/list(ARR) of size 'N'. It only contains 0s, 1s and 2s. Write a solution to sort this array/list.

Note :
Try to solve the problem in 'Single Scan'. ' Single Scan' refers to iterating over the array/list just once or to put it in other words, you will be visiting each element in the array/list just once.
Problem approach

I solved this question using three-pointers and this problem was a variation of dutch national flag problem. The interviewer was satisfied by my approach as this was the most optimal approach.

Try solving now
03
Round
Medium
Video Call
Duration60 minutes
Interview date11 Apr 2022
Coding problem4

1. Anagram Pairs

Moderate
30m average time
60% success
0/80
Asked in companies
NearbuyAppleAmerican Express

You are given two strings 'str1' and 'str1'.


You have to tell whether these strings form an anagram pair or not.


The strings form an anagram pair if the letters of one string can be rearranged to form another string.

Pre-requisites:

Anagrams are defined as words or names that can be formed by rearranging the letters of another word. Such as "spar" can be formed by rearranging letters of "rasp". Hence, "spar" and "rasp" are anagrams. 

Other examples include:

'triangle' and 'integral'
'listen' and 'silent'
Note:
Since it is a binary problem, there is no partial marking. Marks will only be awarded if you get all the test cases correct. 
Problem approach

I implemented it first by sorting two strings and comparing them. He asked me to write a better approach. So I used a hashmap to do it.

Try solving now

2. OS Question

What are the differences between threads and processes? (Learn)

Problem approach

This is most basic question of OS and I explained it very well using a tabular representation.

3. OS Question

What are the Deadlocks and their prevention? (Learn)

Problem approach

I firstly told him necessary conditions for deadlock and then explained him that if we don’t let all conditions fulfilled for deadlock then it may be prevented.

4. Trie Implementation

Moderate
25m average time
65% success
0/80
Asked in companies
MicrosoftMedia.netDunzo

Implement a Trie Data Structure which supports the following three operations:

Operation 1 - insert(word) - To insert a string WORD in the Trie.

Operation 2-  search(word) - To check if a string WORD is present in Trie or not.

Operation 3-  startsWith(word) - To check if there is a string that has the prefix WORD.


Trie is a data structure that is like a tree data structure in its organisation. It consists of nodes that store letters or alphabets of words, which can be added, retrieved, and deleted from the trie in a very efficient way.


In other words, Trie is an information retrieval data structure, which can beat naive data structures like Hashmap, Tree, etc in the time complexities of its operations.


The above figure is the representation of a Trie. New words that are added are inserted as the children of the root node. 

Alphabets are added in the top to bottom fashion in parent to children hierarchy. Alphabets that are highlighted with blue circles are the end nodes that mark the ending of a word in the Trie.


For Example:-
Type = ["insert", "search"], Query = ["coding", "coding].
We return ["null", "true"] as coding is present in the trie after 1st operation.
Problem approach

I wrote a class to implement a character, Trie, using a vector of nodes as children. He asked me to improve on space. So I used a hashmap to store the child nodes only if a child exists. I wrote the code for insertion and finding a word and walked him through it.

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

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
2 rounds | 5 problems
Interviewed by MAQ Software
1760 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 5 problems
Interviewed by MAQ Software
1012 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 3 problems
Interviewed by MAQ Software
1452 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by MAQ Software
1252 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
2 rounds | 3 problems
Interviewed by BNY Mellon
6261 views
3 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by BNY Mellon
0 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by CIS - Cyber Infrastructure
2160 views
0 comments
0 upvotes