Flipkart Grid Coding Questions and Answers

Flipkart Grid Coding Questions with Solutions

In this page, you will find out Flipkart Grid Coding Questions and Answers with other Tech Awareness / CS-IT Fundamentals based questions, asked in Online Assessments conducted by Flipkart as Hiring Challenge names as GRID. 

Apart from that you will get more Insights on Flipkart GRID Hiring Challenge, CTC Offered, Steps involved in this challenge, etc. 

flipkart-grid-coding-questions

About Flipkart GRID Hiring Challenge

Flipkart GRID is a renowned Engineering Campus Hiring Challenge that allows participants to utilize their technical expertise, compete, and solve practical problems in the e-commerce domain.

In this Hiring Challenge Candidates have to make a team of 2 – 3 people. All team members are required take the Online Assessment (1st Round) individually.
Then, in next round certain Problem Statements will be given that is needed to be solved in particular timeframe, by the team. 
If there solution got selected, then in 3rd Round the selected team will be presenting Solution for Selected Problem Statement.

Steps in Flipkart GRID Hiring Challenge

Flipkart GRID Hiring Challenge consists of the following steps :
  1. Online Assessment [ Technical & E-Commerce Awareness ]
  2. Problem Statement Selection and Solving
  3. Problem Statement Solution Submission
  4. Solution Presentation
We have mentioned further details of the Flipkart GRID Hiring Challenge in the following Tabular Form
FlipkartRelated Information
Position :
  1. Tech Internships
  2. Software Development Engineer – 1
Course :
  • B.Tech/B.E./B.S./M.Tech/M.S or related Engineering.
  • Candidates with any specialization are Eligible.
  • Eligible Batch: 2024 – 2027
Eligibility Criteria / Academic Qualification Required :

No Percentage or CGPA Criteria

Salary Offered :
  • For Interns: ₹ 1 Lakh per month
  • For SDE 1: ₹ 32 LPA

Prime Course Trailer

Related Banners

Get PrepInsta Prime & get Access to all 200+ courses offered by PrepInsta in One Subscription

Sample Flipkart Grid Coding Questions with Solutions

Problem Statement:

You are working at a package sorting facility for a major e-commerce company. Your task is to design an efficient algorithm that can sort packages based on their weights and ensure that they are loaded onto the delivery trucks in the correct order.

Input:

– You are given a list of packages, each represented by an integer weight. The weights are positive integers, and the list can have duplicates.
– Additionally, you are given the maximum weight capacity of each delivery truck. No truck can carry a package with a weight exceeding this capacity.

Output:

– Your algorithm should sort the packages in a way that they can be efficiently loaded onto the delivery trucks, respecting their weight capacities.

Constraints:

– The number of packages, N, will be an integer in the range 1 ≤ N ≤ 10^5.
– The weight of each package, W, will be an integer in the range 1 ≤ W ≤ 10^3.
– The maximum weight capacity of each truck, C, will be an integer in the range 1 ≤ C ≤ 10^4.

Example:

Input:
packages = {30, 10, 50, 20, 40}

truckCapacity = 60

Output:
{{10, 50}, {20, 40}, {30}}

Solution :

To efficiently sort the packages based on their weights and load them onto the delivery trucks, we can use the “Greedy Algorithm” approach. The idea is to always choose the heaviest package available that can fit within the remaining capacity of the current truck. If no package can fit, start a new truck.

Here’s the step-by-step process:

1. Sort the packages in non-increasing order of their weights.
2. Initialize an empty list of trucks, let’s call it `trucks`.
3. For each package `p` in the sorted list of packages:
– For each truck `t` in `trucks`:
– If the weight of `p` plus the total weight of packages already loaded in `t` is less than or equal to the truck capacity, add `p` to `t` and break the loop.
– If no truck can accommodate `p`, create a new truck `newTruck`, add `p` to `newTruck`, and append `newTruck` to the list of `trucks`.
4. Return the list of trucks after all packages have been processed.

Here’s the C++ code implementation:

#include <bits/stdc++.h>

using namespace std;

vector> sortPackages(vector& packages, int truckCapacity) {
    // Step 1: Sort the packages in non-increasing order of their weights.
    sort(packages.begin(), packages.end(), greater());

    // Step 2: Initialize an empty list of trucks.
    vector> trucks;

    // Step 3: Load packages into trucks based on the Greedy Algorithm approach.
    for (int p : packages) {
        bool loaded = false;
        for (vector& t : trucks) {
            if (t.size() < truckCapacity && t.back() + p <= truckCapacity) {
                t.push_back(p);
                loaded = true;
                break;
            }
        }
        if (!loaded) {
            vector newTruck = {p};
            trucks.push_back(newTruck);
        }
    }

    // Step 4: Return the list of trucks.
    return trucks;
}

int main() {
    vector packages = {30, 10, 50, 20, 40};
    int truckCapacity = 60;

    vector> sortedTrucks = sortPackages(packages, truckCapacity);

    // Output the sorted packages in each truck
    for (const vector& truck : sortedTrucks) {
        cout << "{";
        for (size_t i = 0; i < truck.size(); ++i) {
            cout << truck[i];
            if (i < truck.size() - 1) {
                cout << ", ";
            }
        }
        cout << "}" << endl;
    }

    return 0;
}

FAQs related to Flipkart Grid Hiring Challenge

Question 1: Who is eligible for Flipkart GRID?
  • Students pursuing B.Tech/B.E./M.Tech/ or related Engineering programs with any Specialization in India are eligible for participating in Flipkart GRID Hiring Challenge.
  • Students of Batch 2024,2025, 2026 & 2027 are eligible.
  • No specific Academic criteria is required.
Question 2: What are the topics covered in E-commerce section of Online Assessment ?

E-Commerce section of the Online Assessment consists of Topics that are discussed on the Stories page of Flipkart.

Question 3: What are the covered in Technical awareness section of Online Assessment ?

Technical awareness section of the Online Assessment consists of Data Structures and Algorithms, CS – IT Fundamentals based Questions.

Question 4: Is participants are allowed to choose the Problem Statements ?

Yes, Shortlisted teams from Level 1 are required to submit their preferences of their own for the given Problem Statements. They have to select 1 Problem Statement.

Question 5: What is exactly the 2nd Round of Flipkart GRID Hiring Challenge ?

After the selection of the Problem statement, the Team needs to Create a Coding solution for the same along with the Demo Video of the solution.

Question 6: What happens after clearing the 2nd Round of Flipkart Grid ?

Qualified teams will get a chance to Conduct a presentation to showcase the Coding Solution they have made for the chosen Problem Statements in front of Industry and domain experts.

Question 7: What is the next step after Clearing the 3rd round ?

After clearing the National Finale Round of Flipkart GRID, all qualified participants will be offered Tech Internships and Full-time roles of SDE -1.

Question 8: What is the salary offered after Flipkart GRID?
  1. For Technical Intern = ₹ 1 Lakh/month.
  2. For SDE-1 role = ₹ 32 LPA
Question 9: What are the rewards given by the company ?
Flipkart Gift Cards and Certificates of Merit are given as a reward.
  • Winners will get Flipkart Gift Cards worth  ₹ 1,50,000.
  • First Runners-Up Get Flipkart Gift Cards worth ₹ 75,000.
  • Certificate of Merit to Top 20 Teams per college, Level 1 qualifying team, and Finalists.
Question 10: How many people are allowed for building a team for Flipkart Grid ?

Only 1 to 3 people are allowed in one particular team. All of them are needed to give the online assessment simultaneously. After that Average of Scores obtained by each team member will be considered.

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others

Checkout list of all the video courses in PrepInsta Prime Subscription

Checkout list of all the video courses in PrepInsta Prime Subscription