Hubspot Software Engineer Coding & Algorithms Interview Questions
Master your tech interview with our curated database of real questions from top companies.
Design file deduplication at scale
Design an algorithm to identify duplicate files in a large directory tree. You are given an iterator over files providing (path, size) and a function ...
Implement Python LRU cache with varargs
Implement an LRU cache in Python as a decorator cache(maxsize) that memoizes a target function's results. Must support positional args, args, and *kwa...
Design and implement a bank account system
Design and implement a minimal banking service with the following capabilities: 1) Create bank accounts with unique IDs and an initial balance; suppor...
Implement a same-host web crawler
Implement a web crawler that, given a starting URL and an interface get_links(url) -> Iterable[str], discovers all pages under the same hostname. Requ...
Find the spammer using hasMessaged
You are given n accounts labeled 0..n-1 and an API boolean hasMessaged(a, b) that returns true if account a has sent a message to account b, and false...
Design a bank with scheduled payments and merges
Design an in-memory banking service that supports the following operations: ( 1) CreateAccount(accountId), ( 2) Deposit(accountId, amount), ( 3) Trans...
Find spammer with minimal hasMessaged calls
You have n accounts labeled 0..n-1 and an oracle hasMessaged(a, b) that returns true if account a has sent at least one message to account b. Define a...
Merge two sorted linked lists
Given the heads of two singly linked lists sorted in non-decreasing order, merge them into a single sorted singly linked list and return its head. Imp...