Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.
About Myntra hiring for Data Science roles
Myntra is an Indian fashion and lifestyle e-commerce platform and part of the Flipkart group. Its technology and analytics teams work on search, personalisation, size recommendations, pricing, supply chain and marketing. It hires for software engineers, SDETs, business analysts, data analysts and data scientists. Fashion-specific data such as sizing matters a lot.
For Data Science roles, this Myntra practice set focuses most on Deep Learning and NLP (6), Feature Engineering (5), Machine Learning (5), Python for Data Science (4). It has 2 easy, 30 medium, 8 hard questions, so you can start easy and work up to the harder ones.
Company type
E-commerce & consumer tech
Headquarters
Bengaluru, India
Main India offices
Bengaluru
Myntra Data Science interview process
Online assessment (coding or SQL)
Technical or machine coding round
Problem solving or case round
Hiring manager round
Typical pattern based on public candidate experiences. Rounds vary by role, team and year.
Solved for MyntraStart practicing
3 QUESTIONS FREESign up to unlock the full question bank and track your progress.Unlock every question and answer, then continue practising company-wise and package-wise.
✓ 3 questions free • Unlock the rest in seconds
01
Write Pandas code to cap outliers at the 1st and 99th percentile.
# fit limits on training data only, then apply to test
low, high = train['income'].quantile([0.01, 0.99])
train['income_capped'] = train['income'].clip(low, high)
test['income_capped'] = test['income'].clip(low, high)
A range built from sample data that would contain the true parameter in a stated percentage (for example 95%) of repeated samples. It is not the probability that the parameter lies inside this one interval.
03
What is the difference between iterators and iterables in Python?
An iterable can produce an iterator (it has __iter__); an iterator has __next__ and remembers its position. A for-loop calls iter() on the iterable and then next() repeatedly.
04
Write Python code to compare revenue per user between two groups using Welch's t-test.
Situation: as the only analyst for three teams, I received 15 ad-hoc SQL requests a week and my model work stalled. Task: protect focus without upsetting stakeholders. Action: I grouped requests, built a self-serve dashboard covering the 5 most common questions, and set up a simple weekly priority review with the managers. Result: ad-hoc requests dropped by 60 percent and the model shipped a month later as planned.
06
Halfway through a test you discover a bug that broke the treatment for Android users. What do you do?
Stop or pause the affected part, fix the bug and restart the test with fresh data, since mixing broken and fixed periods biases results. Do not simply drop Android users from analysis afterwards, because that can break randomisation balance if the bug affected behaviour or logging. Document the incident, and add pre-launch checks such as running the variant through QA on every platform and monitoring guardrails in the first hours.
07
Your neural network's training loss suddenly becomes NaN. What do you check?
Common causes are a learning rate that is too high, exploding gradients, bad input values, and unstable maths like log of zero. I would check the input data for NaN or infinite values, lower the learning rate, add gradient clipping, and make sure the loss uses the stable built-in version with logits. With mixed precision, I would check the loss scaler. Logging gradient norms per step helps find the exact point it breaks.
Situation: two freshers joined my team and struggled with messy real data. Task: help them deliver independently. Action: I paired with them on the first project, set up weekly code reviews, shared a checklist for validation and leakage, and gave them small end-to-end tasks with clear success metrics. Result: within three months both owned models in production. I focus on teaching how to debug and ask questions, not just giving answers.
11
How do you evaluate clustering when you have no labels?
Use internal metrics: the silhouette score compares how close a point is to its own cluster versus the nearest other cluster, and the Davies-Bouldin index measures cluster overlap. The elbow method looks at within-cluster variance. But the real test is usefulness: are clusters stable across random seeds and samples, can the business describe them, and do they behave differently on outcomes like spend or churn?
Function calling lets an LLM respond with a structured request to call a tool you defined, such as get_order_status with an order_id, instead of plain text. Your code runs the function, returns the result to the model, and the model uses it in its final answer. This connects LLMs to live data, calculators and APIs. You must validate arguments, limit which tools exist and handle errors, because the model can choose wrong inputs.
13
What are shadow, canary and A/B deployments for models?
In shadow deployment the new model receives real traffic and logs predictions, but users still get the old model's output; it is safe for checking latency and agreement. A canary sends a small share of traffic, like 5 percent, to the new model and expands if metrics stay healthy. An A/B test splits traffic randomly to measure business impact statistically. Teams often go shadow, then canary, then full rollout.
14
Write a Python function to split a long text into overlapping chunks by word count for a RAG index.
That period is a structural break, not normal behaviour, and letting a model learn from it raw will distort trend and seasonality. Options are to add an indicator feature so the model attributes the drop to the event, to replace the period with values from a counterfactual estimate, or to train only on data after the recovery if enough history exists. Compare options with backtests on recent normal periods and document the choice.
16
Your model API meets average latency but p99 latency is 900 ms against a 200 ms target. What do you do?
Profile slow requests to see if time goes to feature fetching, preprocessing, the model or the network. Common fixes: precompute and cache features, remove slow database calls from the request path, load the model once at start-up, use a faster runtime like ONNX, and warm up instances. Check garbage collection pauses, cold starts and autoscaling limits. Set timeouts with a safe fallback prediction for rare slow cases.
17
Your image classifier trained on 2,000 images memorises the training set within 5 epochs. What do you try?
With so little data, I would use transfer learning from a pretrained model like ResNet or EfficientNet and fine-tune only the top layers first. I would add data augmentation such as flips, crops and colour changes, use dropout and weight decay, and apply early stopping on validation loss. Collecting more labelled images or using a smaller model also helps. I would check for duplicate images across train and validation sets too.
18
After one-hot encoding you have 2,000 features and training is slow. What do you do?
Find which columns caused the explosion, usually a few high-cardinality categoricals. Group rare categories into Other, or switch those columns to frequency, target or hashing encoding. Use sparse matrices so zeros take no memory. Tree libraries like LightGBM and CatBoost can handle categoricals natively without one-hot. Then remove near-constant columns and check that validation scores hold up with the smaller feature set.
19
Your LLM assistant confidently quotes a policy clause that does not exist. Why does this happen and how do you reduce it?
Hallucination is when a model produces confident text that is false or not supported by any source. It happens because the model generates plausible tokens rather than checking facts. Reduce it by grounding answers in retrieved documents, asking the model to cite sources and say I do not know when context is missing, using low temperature, and validating outputs with rules or a second checking step. Measure it with a labelled evaluation set.
20
Your feature computation on millions of rows uses only one CPU core. Would you use threads or processes to speed it up?
Because of the GIL, threads in CPython do not run Python bytecode in parallel. Threads are fine for I/O-bound work like calling APIs or reading many files. For CPU-bound work like feature computation on chunks, multiprocessing or joblib runs separate processes on separate cores. The cost is process start-up time and copying data between processes. Many NumPy and Pandas operations already release the GIL internally, so measure before adding complexity.
L1 (Lasso) adds absolute weights and can shrink some to zero, giving feature selection. L2 (Ridge) adds squared weights and shrinks them smoothly without removing features.
22
What is positional encoding in transformers and why is it needed?
Self-attention treats input tokens as a set, so without extra information it cannot tell word order: dog bites man and man bites dog look the same. Positional encoding adds position information to each token embedding. The original transformer used fixed sine and cosine patterns; BERT learned position embeddings; many modern LLMs use rotary embeddings, which encode relative positions and extend better to longer contexts.
23
Write a scikit-learn ColumnTransformer that preprocesses numeric and categorical columns.
Stratified splitting keeps the class proportions the same in the training and test sets. If 5 percent of customers churn, both sets will have about 5 percent churners. Without it, a small or imbalanced dataset can give a test set with very few positives and unstable metrics. In scikit-learn you pass stratify=y to train_test_split or use StratifiedKFold for cross-validation.
26
Your NLP classifier works well on English reviews but fails on Hinglish reviews. What do you do?
First measure the gap with a labelled Hinglish test set. Hinglish mixes scripts and spellings, so tokenisers built for English split it badly. I would try a multilingual or Indic model such as mBERT, XLM-R or IndicBERT, normalise common spellings, and add labelled Hinglish data, possibly with transliteration. Evaluate per language segment and monitor the language mix in production, because it changes over time.
27
Your model's most important feature is customer_id. What is wrong?
An ID has no real meaning, so high importance means the model is memorising individual customers. It often happens when the same customers appear in both train and test, or when IDs were assigned in time order and act as a proxy for date or signup cohort. I would drop the ID, use a group-based split by customer, and if timing matters, add an explicit feature like account age instead.
28
Write NumPy code to compute the Dice coefficient between a predicted and a true binary mask.
Situation: each monthly retrain needed a day of manual data pulls, notebook runs and copying files to servers. Task: make it reliable and hands-off. Action: I wrapped the steps into a scheduled pipeline with data validation checks, logged runs in MLflow and added an approval step before promotion. Result: retraining time dropped from a day to under an hour of review, and there were no more failed deployments from missed steps.
30
What is MAPE and when is it a poor metric for forecast accuracy?
MAPE is the mean of absolute errors divided by actual values, expressed as a percentage. It is easy to explain to business teams, but it breaks when actuals are zero or near zero, because the percentage explodes. It also penalises over-forecasts more than under-forecasts and weights small items heavily. For intermittent or low-volume series prefer MAE, weighted MAPE or MASE, which compares error to a naive baseline.
Putting features on comparable ranges using standardisation or min-max scaling. Distance-based and gradient-based models (KNN, SVM, regression, neural nets) need it; tree models do not.
32
Write SQL to find the top 3 products by revenue in each category.
WITH rev AS (
SELECT category, product_id, SUM(price * qty) AS revenue
FROM order_items
GROUP BY category, product_id
), ranked AS (
SELECT *, ROW_NUMBER() OVER (PARTITION BY category ORDER BY revenue DESC) AS rn
FROM rev
)
SELECT category, product_id, revenue
FROM ranked
WHERE rn <= 3;
33
What does CI/CD mean for machine learning projects?
Continuous integration runs automatic checks on every code change: unit tests for feature code, data validation, linting and a quick training run on sample data. Continuous delivery packages the model and service, for example as a Docker image, and deploys it through staging to production after evaluation gates, such as the new model beating the current one on a holdout set. Some teams add continuous training, which retrains on new data automatically.
34
A feature won its A/B test with a 4 percent lift, but after full launch the metric barely moved. Why might that happen?
Several reasons are common. Winner's curse: significant results from underpowered tests tend to overestimate the true effect. Novelty effect faded after launch. Seasonality or other launches changed the baseline, so a before-after comparison is misleading. The test population may differ from all users, for example only one platform. Use a holdout after launch to measure real impact, and run tests with adequate power and duration.
35
Write a Python function that deterministically assigns users to experiment variants using hashing.
import hashlib
def assign(user_id, experiment, variants=('control', 'treatment'), weights=(50, 50)):
key = f'{experiment}:{user_id}'.encode()
bucket = int(hashlib.sha256(key).hexdigest(), 16) % 100
cumulative = 0
for v, w in zip(variants, weights):
cumulative += w
if bucket < cumulative:
return v
# Same user + experiment always gets the same variant;
# salting with the experiment name keeps tests independent
36
You added an index but the query is still slow. How do indexes work, and when do they fail to help or even hurt?
An index is a separate sorted structure, usually a B-tree, that lets the database find rows without scanning the whole table, like a book index. It speeds up filters, joins and sorting on the indexed columns. Indexes cost storage and slow down inserts, updates and deletes because each index must be updated. They may be ignored for low-selectivity columns or when a function is applied to the column in WHERE.
37
Write Pandas code to read a large CSV in chunks and compute total sales per city.
# process 1 million rows at a time
import pandas as pd
totals = {}
for chunk in pd.read_csv('sales.csv', usecols=['city', 'amount'], chunksize=1_000_000):
part = chunk.groupby('city')['amount'].sum()
for city, amt in part.items():
totals[city] = totals.get(city, 0) + amt
result = pd.Series(totals).sort_values(ascending=False)
38
Your manager asks whether collecting more training data will improve the model. How do you answer using a learning curve?
A learning curve plots training and validation scores against the size of the training set. If both scores are low and close, the model has high bias and needs more features or a more flexible model. If training is high but validation is much lower and the gap narrows as data grows, the model has high variance and more data will help. It tells you whether collecting more data is worth the cost.
The ROC curve plots true positive rate against false positive rate across thresholds. AUC is the probability that a random positive is ranked above a random negative; 0.5 is chance.
40
Write SQL to find the median order value per city.
SELECT city,
PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY amount) AS median_amount
FROM orders
GROUP BY city;
-- PERCENTILE_CONT interpolates; PERCENTILE_DISC returns an actual value
Tips to crack the Myntra Data Science interview
Prepare cases on fashion e-commerce issues like returns due to size, discount depth or End of Reason Sale planning.
Practise SQL and Python for analytics roles, including cohort and funnel analysis on order data.
Read about Myntra's use of data science in size recommendations and visual search.
Keep a one-minute story ready for every project on your CV: problem, your part, tools, result.
Practise the hard questions on this page aloud; Myntra interviewers usually ask follow-ups on your first answer.
Frequently asked questions
How many rounds are there in the Myntra Data Science interview?
Candidates usually go through 4 stages: Online assessment (coding or SQL); Technical or machine coding round; Problem solving or case round; Hiring manager round. The exact rounds change with the role, team, location and your experience, so confirm the process with the recruiter.
Which topics should I prepare for the Myntra Data Science interview?
This practice set leans on Deep Learning and NLP (6), Feature Engineering (5), Machine Learning (5), Python for Data Science (4). Revise those first, then practise explaining one or two of your own projects end to end, because most Myntra interviewers ask you to walk through real work.
Are these the exact questions asked at Myntra?
No. These are curated practice questions that match the skills and difficulty usually tested in e-commerce & consumer tech interviews like Myntra's. They are not a leaked or verified list of past questions.
Where does Myntra hire Data Science professionals in India?
Myntra has large teams in Bengaluru. Openings and locations change often, so check the Myntra careers page and filter by city and experience.