interview experience logo
Interview Experience· Core Engineer

SquadStack.ai OA (On - Campus, Core Engineer)

Posted
12 Sept 2026
88 reads

Summary

I completed SquadStack.ai's on‑campus online assessment, which included aptitude, core CS, coding, and SQL questions.

How it went

SquadStack.ai OA Experience

  • 10 Aptitude questions
  • 15 Core CS questions
  • 2 coding questions
  • 1 SQL question

Had negative marking (-0.5)

The two coding questions were:

1. Decode Ways - Leetcode 91 (with a twist)

LeetCode 91 - Decode Ways was the base question. It had a small twist that the way you read a character is associated with a cost and you have to minimise the cost of reading the string. Solvable if you had solved this before.

2. Minimum Seats Required - Car Pooling — LeetCode 1094

You are given a car that travels in one direction along a route.

You are given an array stops, where each element is:

[p, f, t]

p = number of passengers f = point where the passengers get into the car t = point where the passengers get out of the car

Passengers can get in and out at different points along the route.

At each point, passengers who are getting down leave the car first, and then new passengers are picked up.

Find the minimum number of seats required in the car to accommodate all passengers.

LeetCode 1094 — Car Pooling

SQL Problem: Find the Dominant Seller

Problem Description

You are given two tables: Sellers and Orders.

Sellers

ColumnTypeDescription
seller_idINTPrimary key
seller_nameVARCHARName of the seller

Orders

ColumnTypeDescription
order_idINTPrimary key
seller_idINTForeign key referencing Sellers
item_qtyINTQuantity of items sold
item_rateDECIMALRate per item

Task

Calculate the total revenue generated by each seller:

total_revenue = SUM(item_qty * item_rate)

A seller is considered a Dominant Seller if their total revenue is strictly greater than the combined total revenue of all other sellers.

Return the seller_id and total_revenue of all dominant sellers.

Example

Suppose the total revenues are:

Seller 1 → 1000
Seller 2 → 300
Seller 3 → 200

Seller 1 is dominant because:

1000 > 300 + 200

Therefore, the answer is:

seller_id | total_revenue
----------|--------------
1         | 1000

SQL Solution

WITH seller_revenue AS (
    SELECT
        seller_id,
        SUM(item_qty * item_rate) AS total_revenue
    FROM Orders
    GROUP BY seller_id
),
total_revenue AS (
    SELECT SUM(total_revenue) AS overall_revenue
    FROM seller_revenue
)
SELECT
    sr.seller_id,
    sr.total_revenue
FROM seller_revenue sr
CROSS JOIN total_revenue tr
WHERE sr.total_revenue > tr.overall_revenue - sr.total_revenue;

Explanation

Let:

R = seller's revenue
T = total revenue of all sellers

Revenue generated by all other sellers is:

T - R

So the condition for a dominant seller is:

R > T - R

which is equivalent to:

2R > T

The CTE first calculates revenue per seller, then calculates the overall revenue, and finally identifies sellers whose revenue is greater than the combined revenue of everyone else.

Questions asked (3)

  1. 01

    Decode Ways with Cost Minimization

    Data Structures & Algorithms · Medium

    Base problem: Given a string of digits, count the number of ways to decode it (LeetCode 91). Twist: Each character read has an associated cost, and you must minimize the total cost of reading the string while still decoding it correctly.

    Open the problem
  2. 02

    Minimum Seats Required – Car Pooling

    Data Structures & Algorithms · Medium

    You are given an array of stops, each represented as [p, f, t] where p is the number of passengers, f is the point where they get into the car, and t is the point where they get out. Passengers exit before new ones board at each point. Find the minimum number of seats required to accommodate all passengers.

    LeetCode 1094 – Car Pooling.

    Open the problem
  3. 03

    Find the Dominant Seller

    Data Structures & Algorithms

    Given tables Sellers(seller_id, seller_name) and Orders(order_id, seller_id, item_qty, item_rate), compute total revenue per seller (item_qty * item_rate). Return sellers whose revenue is strictly greater than the combined revenue of all other sellers.

    SQL solution provided in the post.

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Interview Experience recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

Be the first to share your thoughts and start the discussion!