Data Engineer Coding & Algorithms Interview Questions
Practice the exact questions companies are asking right now.
Write SQL for car rental utilization by city
SQL / Data Query Prompt (Car Rental) You are given four tables: user - user_id location - location_id - city car - car_id - car_size (e.g., compact, m...
Solve SQL and Python coding tasks
You are given a small library system with the following relational schema and several Python data-processing tasks. Answer the SQL questions and imple...
Implement most_frequent_key without using max()
Problem (Python OOP) You are given two classes. Parent precomputes frequency counts of items (as strings) from an input list. `python class Parent: ...
Count islands using BFS without modifying grid
You are given an m x n binary grid grid where: - 1 represents land - 0 represents water - Islands are groups of horizontally or vertically adjacent la...
Compute capacities after site closures
You are given a nested dictionary redistribution where redistribution[closed_site][dest_site] equals the additional capacity required at dest_site if ...
Implement classes within an abstract Python framework
You are given an existing Python codebase (~200 lines shown) that defines an abstract base class DataProcessor with abstract methods load(self), trans...
Validate alternating checkout/return logs
Given a chronological list of events logs of the form (timestamp, book_id, is_checkout) where is_checkout is True for a checkout and False for a retur...
Compute missing letters to form original string
Implement a function that, given two strings original and typed (typed is a misspelled/partial version of original), returns the number of additional ...
Solve four algorithmic library problems
Solve the following coding tasks: 1) Maximum Points from Different Categories: Given an array of items (category, points) and an integer k, choose exa...
Recommend friends-of-friends
Question Given a dictionary such as {A:[B,C], B:[C,D], C:[E]}, return for a user U all people followed by U’s followees but not already followed by U....
Validate carpool capacity
Question LeetCode 1094. Car Pooling – Given trips[i] = [numPassengers, start, end] and an integer capacity, return true if the vehicle can fulfill all...
Check carpool trip feasibility
You are given a list of trips where each trip i is (passengers_i, start_i, end_i) with start_i < end_i on a one-dimensional route. A single vehicle wi...
Solve library coding tasks in Python
Implement the following Python tasks: 1) Given a list of (category, points) for books, choose up to 3 books with all different categories to maximize ...