Skip to content

Hexaware Data Science Interview Questions & Answers

Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.

About Hexaware hiring for Data Science roles

Hexaware Technologies is an Indian IT services company offering cloud, application, testing, data and business process services. It promotes an automation-first approach and serves clients in financial services, healthcare, travel and manufacturing. In India it hires for software engineers, test engineers, data analysts and data engineers.

For Data Science roles, this Hexaware practice set focuses most on Machine Learning (7), Deep Learning and NLP (6), Statistics and Probability (4), SQL for Data Science (4). It has 18 easy, 22 medium questions, so you can start easy and work up to the harder ones.

Company type
IT services
Headquarters
Navi Mumbai, India
Main India offices
Navi Mumbai, Chennai, Pune, Bengaluru, Noida

Hexaware Data Science interview process

  1. Online assessment (aptitude + coding)
  2. Communication assessment
  3. Technical interview
  4. HR round

Typical pattern based on public candidate experiences. Rounds vary by role, team and year.

Solved for HexawareStart 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

Pearson vs Spearman correlation?

Save to ▾
Show answer
Pearson measures linear relationships on continuous data; Spearman uses ranks, so it captures monotonic relationships and is less sensitive to outliers.
02

What is standard error and how is it different from standard deviation?

Save to ▾
Show answer
Standard deviation measures how spread out individual data points are. Standard error measures how much a sample statistic, usually the mean, would vary if you repeated the sampling. For the mean, SE = SD divided by the square root of n. So with more data the standard deviation stays roughly the same, but the standard error shrinks. Confidence intervals and t-tests are built on the standard error.
03

What is the difference between zero-shot and few-shot prompting?

Save to ▾
Show answer
In zero-shot prompting you give only instructions, like classify this review as positive or negative. In few-shot prompting you also include a few worked examples of input and correct output, which shows the model the format and decision boundary. Few-shot usually improves consistency on custom labels, at the cost of more tokens. Pick examples that cover tricky cases and keep their format identical to what you want back.
04

What are precision and recall trade-offs in practice?

Save to ▾
Show answer
Raising the threshold improves precision but lowers recall. Fraud detection leans to recall, while spam filters often prefer precision; choose by the cost of each error.
05

What is normalisation, and why are analytics tables often denormalised?

Save to ▾
Show answer
Normalisation splits data into related tables to remove redundancy, so each fact is stored once, which suits transactional systems with many updates. Analytics workloads mostly read large volumes, and joins across many tables are slow and error-prone. So warehouses often use denormalised, wide tables or star schemas that repeat some attributes. The trade-off is more storage and the need to keep copies consistent through pipelines.
06

What is the difference between UNION and UNION ALL?

Save to ▾
Show answer
Both stack the results of two queries with the same number and type of columns. UNION removes duplicate rows, which needs an extra sort or hash step and is slower. UNION ALL keeps every row, including duplicates, and is faster. Use UNION ALL by default when you know the sets do not overlap or when duplicates matter, such as combining transaction logs from two systems.
07

Write a FastAPI endpoint that serves predictions from a saved scikit-learn model.

Save to ▾
Show answer
from fastapi import FastAPI from pydantic import BaseModel import joblib import pandas as pd app = FastAPI() model = joblib.load('model.joblib') class Customer(BaseModel): tenure: int monthly_spend: float plan: str @app.post('/predict') def predict(c: Customer): X = pd.DataFrame([c.model_dump()]) return {'churn_probability': float(model.predict_proba(X)[0, 1])}
08

Explain logistic regression.

Save to ▾
Show answer
It models the log-odds of a binary outcome as a linear function and passes it through a sigmoid to give probabilities, trained by maximising likelihood.
09

What are type hints in Python and why do data teams use them?

Save to ▾
Show answer
Type hints annotate expected types, for example def clean(df: pd.DataFrame, cols: list[str]) -> pd.DataFrame. Python does not enforce them at runtime, but tools like mypy and IDEs use them to catch mistakes early and give better autocomplete. In data teams they make shared pipeline code easier to read and review. They matter most in production code and libraries, less in quick exploratory notebooks.
10

What is the receptive field of a neuron in a CNN?

Save to ▾
Show answer
The receptive field is the region of the input image that can influence one activation. Early layers see small patches like edges, and deeper layers see larger regions, enabling recognition of whole objects. It grows with kernel size, depth, stride and pooling, and dilated convolutions increase it without extra parameters. If the receptive field is smaller than the objects you care about, the network cannot capture their full context.
11

What is named entity recognition?

Save to ▾
Show answer
Named entity recognition finds and labels spans of text such as person names, organisations, locations, dates and amounts. For example, in an invoice email it can pull out the vendor, invoice number and total. It is usually framed as token classification with BIO tags. spaCy and fine-tuned transformer models are common tools. Domain-specific entities, like medicine names, usually need custom labelled training data.
12

Write Pandas code to create lag and rolling features for each customer.

Save to ▾
Show answer
df = df.sort_values(['customer_id', 'month']) g = df.groupby('customer_id')['spend'] df['spend_lag1'] = g.shift(1) df['spend_lag3'] = g.shift(3) # shift first so the current month is not included df['spend_roll3_mean'] = g.transform(lambda s: s.shift(1).rolling(3).mean())
13

What are primary metrics and guardrail metrics in an experiment?

Save to ▾
Show answer
The primary metric is the one the change is meant to improve and that decides success, such as checkout conversion. Guardrail metrics are ones that must not get worse, such as page load time, refund rate, unsubscribes or revenue per user. Defining both before the test prevents cherry-picking afterwards. A change that lifts the primary metric but breaks a guardrail is usually not shipped without further discussion.
14

What is data leakage?

Save to ▾
Show answer
Information from outside the training window, such as future data or test statistics, enters training and inflates performance. Split first, then fit scalers and encoders on training data only.
15

What is the difference between a base model and an instruction-tuned model?

Save to ▾
Show answer
A base model is trained only to predict the next token on large text, so it continues text rather than following requests. An instruction-tuned model is further trained on instruction and answer pairs, and often preference data, so it follows prompts, answers questions and behaves like an assistant. For apps you usually use instruction-tuned or chat models. Base models are mainly starting points for custom fine-tuning.
16

What do kernel size, stride and padding mean in a convolution layer?

Save to ▾
Show answer
The kernel is a small learnable filter, such as 3x3, that slides over the image and computes a weighted sum at each position. Stride is how many pixels it moves each step; stride 2 halves the output size. Padding adds border pixels so the output can keep the same size and edge pixels get processed. Output size equals (input minus kernel plus 2 times padding) divided by stride, plus one.
17

What is the difference between bagging and boosting?

Save to ▾
Show answer
Bagging trains models in parallel on bootstrap samples and averages them (reduces variance, e.g. Random Forest). Boosting trains models one after another, each fixing the previous errors (reduces bias, e.g. XGBoost).
18

What is the difference between one-hot, label and ordinal encoding?

Save to ▾
Show answer
One-hot encoding creates a binary column per category and suits nominal data like city for linear models. Label encoding maps categories to integers arbitrarily; it is fine for tree models but implies a false order for linear models. Ordinal encoding also uses integers but in a meaningful order, like low, medium, high mapped to 0, 1, 2. Choose based on whether categories have a natural order and which model you use.
19

What is mean Average Precision (mAP) in object detection?

Save to ▾
Show answer
For each class, detections are ranked by confidence and a precision-recall curve is computed, where a detection is a true positive if its IoU with an unmatched ground truth box passes a threshold. Average Precision is the area under that curve. mAP is the mean across classes. mAP@0.5 uses IoU 0.5, while mAP@0.5:0.95 averages over thresholds from 0.5 to 0.95 and rewards tighter boxes.
20

What is a neural network?

Save to ▾
Show answer
Layers of connected neurons that apply weights, biases and activation functions to learn complex patterns, trained by backpropagation.
21

Tell me about a time you had to explain a deep learning model's mistake to a client or stakeholder.

Save to ▾
Show answer
Situation: our document classifier mislabelled several legal notices, and the client was upset. Task: explain clearly and restore confidence. Action: I showed the misclassified examples, explained that they used a format absent from training data, and avoided jargon. I proposed adding those samples, a confidence threshold for human review and weekly error reports. Result: errors on that format fell sharply and the client extended the project.
22

L1 vs L2 regularisation?

Save to ▾
Show answer
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.
23

How do one-stage and two-stage object detectors differ?

Save to ▾
Show answer
Two-stage detectors, like Faster R-CNN, first propose candidate regions and then classify and refine each one, which gives strong accuracy, especially for small objects, but is slower. One-stage detectors, like YOLO and SSD, predict boxes and classes directly over a dense grid in a single pass, making them fast enough for real-time video. Modern one-stage models have closed most of the accuracy gap, so they dominate edge and video use cases.
24

What is the difference between a set and a dictionary?

Save to ▾
Show answer
A set stores unique values with no keys; a dictionary stores key-value pairs with unique keys. Both use hashing, so lookups are O(1) on average.
25

Which activation functions do you know and when to use them?

Save to ▾
Show answer
ReLU for hidden layers, sigmoid for binary outputs, softmax for multi-class outputs and tanh when zero-centred outputs help; Leaky ReLU avoids dead neurons.
26

What is the difference between iterators and iterables in Python?

Save to ▾
Show answer
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.
27

What is experiment tracking and why use a tool like MLflow?

Save to ▾
Show answer
Experiment tracking records each training run's parameters, code version, data version, metrics and output artefacts. Tools like MLflow or Weights and Biases store this in one place, so you can compare runs, reproduce the best model and see why something improved. Without it, results live in notebook outputs and memory. MLflow also offers a model registry to move approved models through staging and production.
28

What is a CTE and what is a recursive CTE?

Save to ▾
Show answer
A CTE, common table expression, is a named temporary result defined with WITH and used in the query that follows. It breaks complex SQL into readable steps and can be referenced more than once. A recursive CTE refers to itself: an anchor query starts the result and a recursive part keeps adding rows until none are added. It is used for hierarchies like employee-manager chains or generating date series.
29

What is the difference between hard voting and soft voting in ensembles?

Save to ▾
Show answer
In hard voting each model predicts a class and the majority wins. In soft voting each model gives class probabilities, they are averaged, and the class with the highest average wins. Soft voting usually works better because it uses each model's confidence, but it needs calibrated probabilities from all models. Hard voting is simpler and works even with models that only output labels.
30

What are the novelty effect and the primacy effect in A/B tests?

Save to ▾
Show answer
The novelty effect is when users engage more with a change simply because it is new, so early results overstate the long-term lift. The primacy effect is the opposite: existing users resist change at first, so early results understate it. Both fade with time. To detect them, plot the treatment effect by day and by user tenure, compare new users with existing users, and run the test long enough for behaviour to settle.
31

What is the difference between layer normalisation and batch normalisation?

Save to ▾
Show answer
Batch normalisation normalises each feature using the mean and variance across the batch, so it depends on batch size and behaves differently in training and inference. Layer normalisation normalises across the features of each single example, so it works with any batch size and with variable-length sequences. That is why transformers use layer norm, often in the pre-norm position, while CNNs traditionally use batch norm.
32

Write Python code to group a list of order dictionaries by city and sum the amounts without Pandas.

Save to ▾
Show answer
from collections import defaultdict orders = [ {'city': 'Pune', 'amount': 250}, {'city': 'Delhi', 'amount': 400}, {'city': 'Pune', 'amount': 150}, ] totals = defaultdict(float) for o in orders: totals[o['city']] += o['amount'] print(dict(totals)) # {'Pune': 400.0, 'Delhi': 400.0}
33

What is a system prompt in an LLM application?

Save to ▾
Show answer
A system prompt is the instruction message placed before user messages that sets the model's role, tone, rules and output format, for example 'You are a support assistant; answer only from the provided policy and reply in JSON'. It shapes every response in the conversation. Keep it clear and specific, version it like code, and do not rely on it alone for security, since users can try to override it through prompt injection.
34

What is stratified sampling in a train-test split?

Save to ▾
Show answer
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.
35

What is the difference between parametric and non-parametric tests?

Save to ▾
Show answer
Parametric tests assume a distribution (usually normal) and use means; non-parametric tests such as Mann-Whitney use ranks and make fewer assumptions.
36

What is a confidence interval?

Save to ▾
Show answer
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.
37

What are quantile and power transforms such as Box-Cox and Yeo-Johnson, and when do you use them?

Save to ▾
Show answer
Power transforms reshape a skewed feature to look more normal. Box-Cox needs strictly positive values, while Yeo-Johnson also handles zero and negative values; both learn a lambda parameter from training data. A quantile transform maps values to a uniform or normal distribution by rank, which is robust to outliers. They help linear models, distance-based methods and neural networks, but tree models rarely need them.
38

What is regularization? Explain L1 vs L2.

Save to ▾
Show answer
Regularization adds a penalty on weights to reduce overfitting. L1 (Lasso) adds |w| and can push features to exactly zero. L2 (Ridge) adds w² and shrinks weights smoothly.
39

Why do we use activation functions? Why is ReLU popular?

Save to ▾
Show answer
Activations add non-linearity so networks can learn complex patterns. ReLU (max(0, x)) is cheap and reduces vanishing gradients compared with sigmoid/tanh; Leaky ReLU avoids 'dead' neurons.
40

What is the difference between WHERE and HAVING in SQL?

Save to ▾
Show answer
WHERE filters individual rows before grouping, so it cannot use aggregate functions. HAVING filters groups after GROUP BY and can use aggregates. Example: WHERE order_date >= '2026-01-01' keeps only this year's orders, then GROUP BY customer_id HAVING SUM(amount) > 10000 keeps customers who spent more than 10,000. Filtering early with WHERE is also faster because fewer rows are grouped.

Tips to crack the Hexaware Data Science interview

  • Practise aptitude and simple coding questions under time pressure for the online assessment.
  • Revise automation testing basics with Selenium and API testing, as quality engineering is an important service line.
  • Learn about Hexaware's automation and cloud focus and its key industry verticals for company questions.
  • 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; Hexaware interviewers usually ask follow-ups on your first answer.

Frequently asked questions

How many rounds are there in the Hexaware Data Science interview?

Candidates usually go through 4 stages: Online assessment (aptitude + coding); Communication assessment; Technical interview; HR 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 Hexaware Data Science interview?

This practice set leans on Machine Learning (7), Deep Learning and NLP (6), Statistics and Probability (4), SQL for Data Science (4). Revise those first, then practise explaining one or two of your own projects end to end, because most Hexaware interviewers ask you to walk through real work.

Are these the exact questions asked at Hexaware?

No. These are curated practice questions that match the skills and difficulty usually tested in it services interviews like Hexaware's. They are not a leaked or verified list of past questions.

Where does Hexaware hire Data Science professionals in India?

Hexaware has large teams in Navi Mumbai, Chennai, Pune, Bengaluru, Noida. Openings and locations change often, so check the Hexaware careers page and filter by city and experience.

Data Science questions for similar companies