Python Coding Questions
Given a list of customer orders where each order contains multiple dishes, find the pair of dishes that appear together in the highest number of orders.
Example: If dishes A and B appear together in multiple orders, return the pair with the maximum co-occurrence count.
Given a list containing duplicate numbers (e.g., [2, 2, 5, 7, 5]), return only the distinct elements.
Using list comprehension, generate the squares of the first 10 positive integers.
Expected output: [1, 4, 9, 16, 25, 36, 49, 64, 81, 100]
Given a paragraph and a list of banned words, find the most frequent word that is not banned.
Example:
Paragraph: "Bob hit a ball, the hit BALL flew far after it was hit."
Banned: ["hit"]
Output: "ball"
SQL Questions
Tables:
Restaurant Table:
restaurant_id
dist_id
Driver Earnings Table:
de_id
date
order_id
earnings
Dish Availability Table:
dist_id
available (0/1)
last_updated
Questions:
Find the total number of orders delivered by each driver on each day.
For each dish at each restaurant, find the most recent availability status using the latest last_updated timestamp.
The interview focused on SQL fundamentals, Python problem-solving, and basic machine learning concepts. The coding questions were not heavily focused on DSA but more on practical data manipulation and reasoning.