HubSpot logo

HubSpot Interview Questions

21 practice questions for HubSpot technical interviews

HubSpot software engineer interviews cover algorithms, data structures, system design, and coding problems drawn from real interview rounds.

Software Engineer Backend Engineer Frontend Engineer Full Stack Engineer Mobile Engineer Data Engineer Data Scientist ML Engineer DevOps Engineer DevOps Engineer Product Manager SRE Security Engineer Engineering Manager Data Analyst UX/UI Designer QA Engineer
coding Hard Verified Question #1

1. OA[CodeSignal] Cloud File Storage System


Category: Graph coding problem

Question Your task is to implement a simple in-memory cloud storage system that maps objects (files) to their metadata (name, size, etc.). You...

Input: Graph (nodes and edges)
Output: Array
coding Hard Verified Question #2

2. OA[CodeSignal] Design Banking System


Category: Graph coding problem

Question Design a banking system that supports account management, transactions, and various financial operations.

Input: Graph (nodes and edges)
Output: Computed result
coding Hard Verified Question #3

3. OA[CodeSignal] In-Memory Database


Category: Graph coding problem

Description Implement a simplified in-memory database that supports record manipulation with various operations. The system should handle basic...

Input: Graph (nodes and edges)
Output: Array
coding Medium Verified Question #4

4. Service Log Aggregator


Category: Trie-based coding problem
A distributed system emits log entries from multiple services and worker threads. Each log entry is a colon-separated string in the format...
Input: Array
Output: Computed result
coding Easy Verified Question #5

5. Top Recurring Substring


Category: Graph coding problem
A search analytics service needs to find which fixed-length pattern occurs most often in a block of text. Given a lowercase string s and a positive...
Input: Graph (nodes and edges)
Output: Computed result
coding Medium Verified Question #6

6. Arithmetic Expression Tree


Category: Binary tree coding problem
You are given a mathematical expression encoded as a binary tree in JSON format. Evaluate the expression and return its integer result. Each node in...
Input: Binary tree
Output: Computed result
coding Hard Verified Question #7

7. Event Participant Role Validator


Category: Trie-based coding problem

Question A conference platform manages associations between events, attendees, and their roles. Each association is represented by three strings:...

Input: List
Output: Array
coding Medium Verified Question #8

8. Team Standup Scheduler


Category: Algorithm coding problem

Question A remote-work platform needs to schedule weekly standups for distributed teams. Each team member provides a list of dates (formatted as...

Input: List
Output: Array
coding Hard Verified Question #9

9. Peak Stream Viewer Tracker


Category: String coding problem

Question A streaming analytics platform needs to track peak viewership for each user on each day. You are given a list of Session records. Each...

Input: List
Output: Computed result
coding Easy Verified Question #10

10. Top Frequency Substring


Category: Graph coding problem
Given a string text containing only lowercase English letters and a positive integer k, find the substring of length k that appears most...
Input: Graph (nodes and edges)
Output: Computed result
coding Medium Verified Question #11

11. [CodeSignal] Contact Role Capacity Validator


Category: String coding problem
A platform tracks permission assignments between departments, employees, and their access levels. Each assignment is represented by three strings:...
Input: List
Output: Array
coding Medium Verified Question #12

12. [CodeSignal] Country Meeting Date Finder


Category: Algorithm coding problem
A global organization is scheduling regional check-ins for its distributed teams. Each team member belongs to a region and provides a list of...
Input: List
Output: Array
coding Medium Verified Question #13

13. [CodeSignal] Customer Peak Call Tracker


Category: String coding problem
A billing platform tracks user sessions for resource usage metering. Each session record contains: - userId: an integer identifying the user. -...
Input: List
Output: Computed result
coding Medium Verified Question #14

14. Expression Tree Calculator


Category: Tree coding problem
Given a mathematical formula represented as a JSON object, compute its result. The formula is encoded as a recursive expression tree with two node...
Input: Integer(s)
Output: Computed result
coding Medium caching #1

1. CACHING — Implement an LRU Cache for task management

Background: HubSpot often handles large datasets and user interactions, making efficient data retrieval essential for performance. Implementing an LRU (Least Recently Used) cache helps in speeding up task management features by caching the most frequently interacted tasks.
Problem statement: You are tasked with implementing a class LRUCache which supports get and put operations. The get method should retrieve a value from the cache if it exists, marking it as recently used. The put method should insert a value into the cache; if the cache exceeds its capacity, it should evict the least recently used item. The capacity of the cache will be provided upon initialization.
  • class LRUCache:

- def __init__(self, capacity: int) -> None: # Initialize the LRUCache with positive size capacity.
- def get(self, key: int) -> int: # Return the value of the key if the key exists, otherwise return -1.
- def put(self, key: int, value: int) -> None: # Update the value of the key if the key exists. Otherwise, add the key-value pair to the cache. If the number of keys exceeds the capacity, evict the least recently used key.
Example 1:
  • Input:

- cache = LRUCache(2)
- cache.put(1, 1)
- cache.put(2, 2)
- cache.get(1) → Output: 1 (The cache is now {1=1, 2=2})
  • Explanation: 1 is retrieved successfully, confirming it is in cache.

Example 2:
  • Input:

- cache.put(3, 3)
- cache.get(2) → Output: -1 (The cache is now {1=1, 3=3})
  • Explanation: Since the capacity is 2, adding 3 evicts 2 which is the least recently used item.

Constraints:
  • 1 <= capacity <= 3000

  • 0 <= key <= 10000

  • 0 <= value <= 10000

  • The operations get and put will be called at most 10^4 times.
coding Medium hash map #2

2. [Hash Map] — Implement a Task Management System

Background: HubSpot relies on effective task management tools to help users keep track of their projects. Implementing a robust task management system can enhance user productivity by uniquely identifying tasks and their dependencies.
Problem statement: You need to design a system that handles adding tasks, marking tasks as complete, and obtaining a list of active tasks. Each task should have a unique identifier, a name, and a status that indicates whether it is complete or not. Your system should allow the following operations:
  • Adding a new task

  • Marking a task as complete

  • Retrieving all active tasks.

Tasks that are marked complete should no longer appear in the list of active tasks.
Function/class signature:
  • def add_task(self, task_id: int, name: str) -> None:

  • def mark_complete(self, task_id: int) -> None:

  • def get_active_tasks(self) -> List[str]:

Example 1:
  • Input: add_task(1, "Design UI")

  • Output: None

  • Explanation: A new task is added with ID 1 and name "Design UI".


  • Input: add_task(2, "Develop Backend")

  • Output: None

  • Explanation: Another task is added with ID 2 and name "Develop Backend".


  • Input: get_active_tasks()

  • Output: ['Design UI', 'Develop Backend']

  • Explanation: Both tasks are active.


  • Input: mark_complete(1)

  • Output: None

  • Explanation: Task 1 ("Design UI") is marked as complete.


  • Input: get_active_tasks()

  • Output: ['Develop Backend']

  • Explanation: Only the "Develop Backend" task remains active.


Example 2:
  • Input: add_task(3, "Testing")

  • Output: None

  • Input: add_task(4, "Deployment")

  • Output: None

  • Input: mark_complete(3)

  • Output: None

  • Input: get_active_tasks()

  • Output: ['Deployment']


Constraints:
  • The task ID is a unique integer (1 <= task_id <= 10000).

  • The names of the tasks are strings with at most length 100.

  • Tasks must be managed in constant time for adding and completing tasks.
coding Medium hash map #3

3. Task Management System — Implementing a task manager interface

Background: HubSpot values effective project management tools to help teams collaborate efficiently. A task management system can streamline task assignments and tracking within its CRM platform.
Problem statement: You need to implement a simple task management system that allows users to create, update, delete, and retrieve tasks. Each task should have an id, title, description, status, and a timestamp for creation.
Function/class signature:
  • create_task(title: str, description: str) -> int

  • update_task(task_id: int, title: Optional[str] = None, description: Optional[str] = None, status: Optional[str] = None) -> bool

  • delete_task(task_id: int) -> bool

  • get_task(task_id: int) -> Optional[Dict[str, Any]]

Example 1:
  • Input: create_task("Fix bug", "Address issue #123")

  • Output: 1

  • Explanation: A new task is created with ID 1.

Example 2:
  • Input: update_task(1, status="completed")

  • Output: True

  • Explanation: The status of task ID 1 is updated to completed.

Constraints:
  • Task titles are limited to 100 characters.

  • There can be a maximum of 1000 tasks in the system.
coding Medium hash map #4

4. CODING — Implement a Task Management System

Background: HubSpot requires a method to manage tasks effectively within its project management tools. This system is fundamental in organizing, tracking, and updating tasks to enhance team collaboration.
Problem statement: You need to implement a task management system that allows you to add tasks, mark them as complete, and retrieve the list of pending tasks. A task is represented as an object containing a title, description, and a completed state. Implement the following methods:
  • add_task(title: str, description: str) -> None

  • complete_task(title: str) -> None

  • get_pending_tasks() -> List[Dict[str, Union[str, bool]]]


Function/class signature:
  • add_task(title: str, description: str) -> None

  • complete_task(title: str) -> None

  • get_pending_tasks() -> List[Dict[str, Union[str, bool]]]


Example 1:
Input: add_task("Task 1", "Description for Task 1")
Output: None
Explanation: A new task is added.
Input: get_pending_tasks()
Output: [{'title': 'Task 1', 'description': 'Description for Task 1', 'completed': False}]
Example 2:
Input: add_task("Task 2", "Description for Task 2")
Output: None
Input: complete_task("Task 2")
Output: None
Input: get_pending_tasks()
Output: [{'title': 'Task 1', 'description': 'Description for Task 1', 'completed': False}]
Constraints:
  • Title of each task is unique and will not exceed 100 characters.

  • Description may contain up to 250 characters.

  • Maximum of 10,000 tasks can be stored.
coding Medium stack queue #5

5. CODING — Task Management System Implementation

1. Background: HubSpot provides a suite of productivity tools to help teams manage their tasks effectively. A key feature of these tools is a task management system that allows users to create, update, and retrieve tasks within a project.
2. Problem statement: Implement a simple task management class, TaskManager, that can manage tasks for a project. The tasks should include methods to add tasks, mark them as completed, retrieve all tasks, and filter completed and active tasks.
3. Function/class signature:
- def add_task(self, task_id: int, task_description: str) -> None:
- def mark_completed(self, task_id: int) -> None:
- def get_all_tasks(self) -> List[Dict[str, Union[int, str, bool]]]:
- def get_completed_tasks(self) -> List[Dict[str, Union[int, str, bool]]]:
4. Example 1:
- Input: task_manager.add_task(1, "Write proposal")
- Output: None
- Explanation: A new task with ID 1 and description "Write proposal" is added.
5. Example 2:
- Input: task_manager.mark_completed(1)
- Output: None
- Explanation: The task with ID 1 is marked as completed.
6. Constraints:
- Maximum of 1000 tasks.
- Task IDs are unique and range from 1 to 1000.
- Task descriptions must be strings and not exceed 250 characters.
coding Medium hash map #6

6. Maximum Task Progression — Implement a task tracking system

Background: HubSpot’s project management features require a lightweight task management system for teams to effectively track tasks and their progress. This functionality is vital for enhancing team collaboration and ensuring tasks are completed in a timely manner.
Problem statement: You need to create a class called TaskManager that allows you to track all tasks and their states. Each task can be either Open, In Progress, or Completed. The class should provide functionalities to add new tasks, update their states, and retrieve the percentage of tasks that have been completed. Task IDs should be unique integers, and you must manage these in a list internally.
Function/class signature:
  • def __init__(self): -> None

  • def add_task(self, task_id: int, task_name: str) -> None:

  • def update_task(self, task_id: int, status: str) -> None:

  • def get_completion_percentage(self) -> float:

Example 1:
Input: tm.add_task(1, "Write Blog Post")
Output: None
Explanation: A new task is added but there's no output.
Input: tm.add_task(2, "Develop Feature")
Output: None
Input: tm.update_task(1, "In Progress")
Output: None
Input: tm.update_task(2, "Completed")
Output: None
Input: tm.get_completion_percentage()
Output: 50.0
Explanation: 1 out of the 2 total tasks are completed.
Example 2:
Input: tm.add_task(3, "Review Code")
Output: None
Input: tm.update_task(3, "Completed")
Output: None
Input: tm.get_completion_percentage()
Output: 66.67
Explanation: 2 out of the 3 tasks are completed.
Constraints:
  • Task IDs are unique integers in the range [1, 1000].

  • Task names are strings of length between 1 and 200.

  • Status inputs are strictly from the set {"Open", "In Progress", "Completed"}.
system design Medium api design #7

7. Task Management System — Implement a basic task manager

Background: HubSpot is known for its product management and marketing tools, and an effective task management system helps teams stay organized and track their progress efficiently.
Problem statement: Implement a class called TaskManager that allows users to manage tasks. Each task should have an ID, title, description, and a status. The TaskManager should allow adding, removing, and updating tasks, as well as retrieving all tasks in a specified status.
  • Function/class signature:

- def add_task(title: str, description: str) -> int:
- def remove_task(task_id: int) -> bool:
- def update_task(task_id: int, title: Optional[str] = None, description: Optional[str] = None, status: Optional[str] = None) -> bool:
- def get_tasks_by_status(status: str) -> List[Dict[str, Union[int, str]]]:
Example 1:
Input: tm = TaskManager()
tm.add_task("Write documentation", "Create user guides and API docs")
Output: 1
Explanation: A new task is added, and the method returns its ID, which is 1.
Example 2:
Input: tm.update_task(1, status="completed")
Output: True
Explanation: The status of the task with ID 1 is successfully updated to completed.
Constraints:
  • Task titles must be non-empty strings.

  • Task IDs must be unique integers starting from 1.

  • Status must be one of: ['pending', 'in_progress', 'completed'].

  • The maximum number of tasks is 1000.

  • Assume all inputs are valid without additional validations.

Start practicing HubSpot questions

Sign up for free to access walkthroughs, AI-generated questions, and more.

Get Started Free