Myntra pvt ltd interview experience Real time questions & tips from candidates to crack your interview

Software Developer

Myntra pvt ltd
upvote
share-icon
3 rounds | 3 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 months
Topics: Data Structures, Algorithms, System Design, Aptitude, OOPS
Tip
Tip

Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

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

Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.

Interview rounds

01
Round
Easy
Video Call
Duration60 minutes
Interview date24 Jul 2021
Coding problem2

This was a online coding interview where I was asked coding questions.

1. Preorder traversal of a BST

Moderate
15m average time
85% success
0/80
Asked in companies
HSBCDisney + HotstarOracle

You have been given an array/list 'PREORDER' representing the preorder traversal of a BST with 'N' nodes. All the elements in the given array have distinct values.

Your task is to construct a binary search tree that matches the given preorder traversal.

A binary search tree (BST) is a binary tree data structure that has the following properties:

• The left subtree of a node contains only nodes with data less than the node’s data.
• The right subtree of a node contains only nodes with data greater than the node’s data.
• Both the left and right subtrees must also be binary search trees.

Note:

It is guaranteed that a BST can be always constructed from the given preorder traversal. Hence, the answer will always exist.
Example:
From PREORDER = [20, 10, 5, 15, 13, 35, 30, 42] , the following BST can be constructed:

example

Problem approach

Preorder traversal is: process the root, left subtree, and then right subtree. So, to emulate this behaviour in a non-recursive way, a stack can be used. 
1. Start with pushing the root node to the stack and continue the traversal till there is at least one node onto the stack. 2. Pop the root node from stack, process it and push it’s right and left child on to stack. We push the right child before the left child because we want to process left subtree before right subtree.
3. Similarly at every node, we push it’s children onto the stack, and the entire left subtree of node will be processed before right child is popped from the stack. 
Algorithm : 
1. Start with root node and push on to stack s
2. While there stack is not empty
Pop from stack current = s.pop() and process the node.
Push current.right onto to stack.
Push current.left onto to stack.
Time Complexity of this approach is O(n).

Try solving now

2. Convert Sorted Array to BST

Easy
15m average time
85% success
0/40
Asked in companies
WalmartAngel One WealthUST Global

You have been given a sorted array of length ‘N’. You need to construct a balanced binary search tree from the array. If there can be more than one possible tree, then you can return any.

Note:

1. A balanced binary tree is a binary tree structure in which the left and right subtrees of every node differ in height by no more than 1.

2. A binary search tree is a binary tree data structure, with the following properties
    a. The left subtree of any node contains nodes with value less than the node’s value.
    b. The right subtree of any node contains nodes with values equal to or greater than the node’s value.
    c. Right, and left subtrees are also binary search trees.

Example:

Below tree, is a balanced binary search tree

1

Below tree is not a balanced tree as the height of the left subtree and right subtree of node ‘5’ differs by more than 1. Moreover, the tree is also not a BST as node ‘2’ is less than node ‘3’ but ‘2’ is the right child of ‘3’.

1

Problem approach

The approach to this question is quite simple. We traverse the array and process each element one by one. We separately create an insert function which basically takes the root node and the array element as parameters and insert the element in the tree after evaluating the conditions: 
1.Start from the root. 
2. Compare the inserting element with root, if less than root, then recurse for left, else recurse for right. 
3. After reaching the end, just insert that node at left(if less than current) else right. 
So, for each array element, we call the insert function and create the BST.

Try solving now
02
Round
Easy
Video Call
Duration60 minutes
Interview date26 Jul 2021
Coding problem1

This was a technical round. Programming based questions and oops/dbms based were asked. 
Some questions were :
1. How many types of trigger?
Ans. In SQL, there are 3 types of triggers :
DML (data manipulation language) triggers – Eg.– INSERT, UPDATE, and DELETE
DDL (data definition language) triggers Eg.– CREATE, ALTER, and DROP
Logon triggers –This type reacts to LOGON events
2. Can trigger be used with select statement?
Ans. No, triggers cannot be used with select statements. They can only be used with Insert, update or delete statements. 
3. Indexing in mysql? How many types of indexing in mysql?
Ans. Indexes are used to find rows with specific column values quickly. It helps to determine the position to seek to in the middle of the data file without having to look at all the data. It performs much faster than reading every row sequentially.
4. Engines in mysql?
Ans. So, in mysql, storage engine is a software module that a database management system uses to create, read, update data from a database. There are two types of storage engines: transactional and non-transactional.
5. Singleton pattern?
Ans. Singleton is a creational design pattern that ensured that a class has only one instance, while providing a global access point to this instance.

1. Pair Sum

Easy
15m average time
90% success
0/40
Asked in companies
SalesforceUberPayU

You are given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to return the list of all pairs of elements such that each sum of elements of each pair equals 'S'.

Note:

Each pair should be sorted i.e the first value should be less than or equals to the second value. 

Return the list of pairs sorted in non-decreasing order of their first value. In case if two pairs have the same first value, the pair with a smaller second value should come first.
Problem approach

The problem can be solved in O(n) time using the concept of hashing. 
Use a hashset to check for the current array value. Check if targetsum – current value exists in the map or not. If it exists, that means a pair with sum equal to target sum exists in the array.

Try solving now
03
Round
Easy
HR Round
Duration30 minutes
Interview date27 Jul 2021
Coding problem0

A number of questions were asked in this round. 
1. Tell me something, you haven’t highlighted in the previous interviews
2. How you keep yourself information-aware?
3. What you do in free time & what is your initiatives in technology?
4. Discussion of mobile technology
5.Why Myntra?
6. What is your choice of work?

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
Software Developer
3 rounds | 9 problems
Interviewed by Myntra pvt ltd
2238 views
1 comments
0 upvotes
Software Developer
3 rounds | 5 problems
Interviewed by Myntra pvt ltd
1933 views
1 comments
0 upvotes
Software Developer
4 rounds | 5 problems
Interviewed by Myntra pvt ltd
1271 views
0 comments
0 upvotes
Software Developer
4 rounds | 5 problems
Interviewed by Myntra pvt ltd
1745 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Developer
5 rounds | 14 problems
Interviewed by Microsoft
3931 views
1 comments
0 upvotes
company logo
Software Developer
6 rounds | 12 problems
Interviewed by SAP Labs
2805 views
0 comments
0 upvotes
company logo
Software Developer
3 rounds | 3 problems
Interviewed by Amazon
1133 views
0 comments
0 upvotes