LogIn
I don't have account.

Swiggy Data Scientist 1 Interview Experience | Python, SQL, Machine Learning & Product Design | Selected

Himanshu Goyal
13 Views

#python

#swiggy-company

#machine-learning

#data-science

#interview-experience

  • Company: Swiggy
  • Role: Data Scientist 1 (Instamart)
  • Experience Level: Early Career (Fresher)
  • Interview Mode: Remote
  • Interview Rounds: 4
  • Difficulty Level: Hard
  • Result: Selected
  • Interview Timeline: 2–3 Weeks

The recruitment process consisted of four rounds, each designed to evaluate a different aspect of a data scientist's skill set. Unlike a typical software engineering interview where coding dominates every round, Swiggy's process balanced programming, statistics, machine learning theory, product thinking and communication skills.

The rounds included:

  • Technical Screening (Python, SQL & Coding)
  • Machine Learning and Statistics
  • Applied Machine Learning & Product Design
  • Hiring Manager / Behavioral Interview

Overall, I found the interview process challenging but extremely well structured. Every round built upon the previous one, moving from coding fundamentals to real-world machine learning applications.

Round 1 : Technical Screening (Python, SQL & Coding)

  • Duration: 60 Minutes

The first round primarily evaluated my programming skills, SQL knowledge and problem-solving ability. The interviewer began with a discussion around core Python concepts. Instead of asking obscure language-specific questions, the focus was on practical programming. We discussed functions, exception handling using try-except, decorators, multithreading and writing clean, maintainable Python code. The interviewer also asked several Pandas-related questions involving data filtering, grouping records using groupby() and performing aggregations. These questions reflected common day-to-day data analysis tasks rather than theoretical knowledge.

The SQL discussion covered joins, subqueries, filtering conditions and query optimization. Throughout the conversation, the interviewer expected me to explain my reasoning instead of simply writing the correct syntax.

After the language-specific discussion, we moved on to a coding problem.

Coding Question : Best Time to Buy and Sell Stock

You are given an array where each element represents the stock price on a particular day. You may buy and sell the stock only once. Return the maximum profit that can be earned.

Example


Input: prices = [7,1,5,3,6,4]

Output:
5

Explanation: Buy at price 1 and sell at price 6, Maximum Profit = 5

My Approach

Before writing any code, I explained the brute-force solution. The simplest way to solve this problem is by checking every possible pair of buying and selling days. For every buying day, we try every future selling day, calculate the profit and keep track of the maximum profit obtained. Although this approach is straightforward, it requires two nested loops, resulting in O(n²) time complexity, which is inefficient for large inputs.

After discussing the brute-force solution, I proposed a more optimized approach. The key observation is that while traversing the array, we only need to remember the lowest stock price seen so far. For every new price, we calculate the profit if we sell on that day and compare it with the maximum profit obtained previously. If we encounter a lower buying price, we simply update it and continue.

This allows us to process the entire array in a single pass. The optimized solution runs in O(n) time while using O(1) extra space.

The interviewer appreciated that I first explained my thought process, compared multiple approaches and only then started implementing the solution.


def max_profit(prices):
    if not prices:
        return 0

    min_price = prices[0]
    max_profit = 0

    for i in range(1, len(prices)):
        if prices[i] < min_price:
            min_price = prices[i]
        else:
            max_profit = max(max_profit, prices[i] - min_price)
    return max_profit


def main():
    prices = [7, 1, 5, 3, 6, 4]
    print(max_profit(prices))


if __name__ == "__main__":
    main()

Round 2 : Statistics, Probability & Machine Learning

  • Duration: 60 Minutes

The second round shifted completely away from coding and focused on mathematical foundations and machine learning theory.

The interviewer began with statistics and probability. Rather than asking only definitions, the questions explored the reasoning behind the concepts. We discussed measures such as mean and variance, followed by the Central Limit Theorem and its practical significance. The interviewer also asked why the standard error of the sample mean is represented as σ/√n and requested an explanation for the variance of the sample mean. There were several probability-based scenarios where I had to reason through different outcomes instead of applying memorized formulas.

The discussion then moved toward machine learning. We talked about evaluation metrics such as Precision, Recall, F1 Score and ROC-AUC. Instead of simply defining each metric, the interviewer wanted to understand when each should be used and the trade-offs involved. The conversation also covered L1 and L2 regularization, the bias-variance trade-off and evaluation metrics for unsupervised learning algorithms like K-Means clustering.

Toward the end of the interview, the focus shifted to deep learning. Questions included calculating CNN output dimensions, understanding the role of Dropout layers and explaining why traditional RNNs suffer from the vanishing gradient problem. I also discussed how LSTMs overcome these limitations using gating mechanisms.

This round was conceptually demanding and required a deep understanding of the underlying mathematics rather than surface-level knowledge.

Round 3 : Applied Machine Learning & Product Design

  • Duration: 60 Minutes

The third round was perhaps the most interesting because it focused on solving practical business problems rather than textbook machine learning questions. The interviewer started by discussing my previous projects and then presented two real-world scenarios inspired by Swiggy's products.

The first problem involved designing a system that could dynamically generate product filters based on a user's search query. Instead of focusing on a particular algorithm, the interviewer wanted to understand how I would think about feature engineering, user behavior, product metadata, historical trends, personalization and ranking relevant filters. We discussed how contextual information and previous user interactions could improve the quality of recommendations.

The second discussion revolved around designing an ETA (Estimated Time of Arrival) prediction model similar to the one used by Swiggy for deliveries. We explored the different features that could influence delivery time, including restaurant preparation time, traffic conditions, weather, delivery partner availability, order volume and distance. The interviewer also asked how I would handle feature drift, model retraining, fallback strategies when live data is unavailable and the trade-offs between batch and real-time prediction systems.

The entire discussion was open-ended and the interviewer evaluated how well I could connect machine learning techniques with real business problems.

Round 4 : Hiring Manager Interview

  • Duration: 60 Minutes

The final round was much more conversational than technical. Instead of asking coding or machine learning questions, the interviewer wanted to understand how I approach challenges, collaborate with others and make decisions in uncertain situations. We discussed my previous experiences working in teams, how I handle constructive feedback and how I prioritize tasks when multiple deadlines overlap.

A significant part of the discussion focused on why I wanted to join Swiggy and what attracted me specifically to the Instamart team. The interviewer also assessed whether my working style aligned with the company's culture and values.

The conversation felt relaxed and provided an opportunity to discuss my long-term career goals and motivation for working in product-focused data science.

Overall Experience

Overall, this was one of the most comprehensive Data Science interview processes I have experienced. While the first round tested programming ability through Python, SQL and a coding problem, the later rounds explored statistics, machine learning, deep learning and real-world product design in considerable depth.

What stood out most was the emphasis on understanding concepts rather than memorizing definitions. Interviewers consistently asked follow-up questions to evaluate reasoning, intuition and the ability to apply theoretical knowledge to practical business scenarios.

The product design discussions around dynamic filters and ETA prediction reflected the actual challenges faced by data scientists at large-scale consumer technology companies, making the interview both challenging and highly relevant.

Although the overall difficulty was high, the interviewers were friendly, encouraged discussion and gave me enough time to explain my approach before arriving at a solution. Successfully clearing all four rounds was a rewarding experience and reinforced the importance of combining strong programming skills with solid statistical foundations and product thinking.

Preparation Tips

Based on my experience, I would recommend spending equal time on programming and machine learning fundamentals. Python, SQL and Pandas should be second nature, as interviewers expect practical proficiency rather than theoretical familiarity.

Alongside coding practice, build a strong understanding of probability, statistics and machine learning fundamentals. Instead of memorizing formulas, focus on understanding why they work and where they are applied. Reading about real-world machine learning systems, feature engineering, model deployment and product metrics can also provide a significant advantage during applied ML discussions.

Most importantly, explain your thought process clearly during interviews. Interviewers are often more interested in how you approach a problem than how quickly you arrive at the final answer.

Advice for Future Candidates

If you are preparing for a Data Scientist role at Swiggy, don't limit your preparation to algorithms alone. Strong Python, SQL and coding skills are certainly important, but they are only one part of the evaluation. Equal emphasis should be placed on statistics, machine learning, experimentation, product thinking and communication.

Whenever you solve a problem, explain your assumptions, justify your decisions and connect your solution to business impact. Demonstrating structured thinking and honest communication creates a much stronger impression than simply providing the correct answer.

Responses (0)

Write a response

CommentHide Comments

No Comments yet.