Rippling logo

Rippling Software Engineer Coding Questions

39 practice questions for Rippling Software Engineer interviews

Rippling 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 Medium Verified Question #1

1. [AI Enabled Coding] Card Game


Category: String coding problem

Question You are building a simplified card game where each player has a hand of cards and the higher-rated hand wins. Each hand contains exactly...

Input: String
Output: Computed result
Want to practise this one?
Create a free account to open the full question and practise Rippling questions with AI.
Sign up free
coding Hard Verified Question #2

2. [AI Enabled Coding] Design Logger


Category: Array coding problem

Question You need to design a logger library for a new application. The design should be able to allow us to easily add future loggers, like a db...

Input: Array
Output: Printed output
coding Medium Verified Question #3

3. [AI Enabled Coding] Food Delivery Company


Category: String coding problem

Question You are building a driver payment system for a food delivery company. The accounting team needs to track how much money is owed to drivers...

Input: String
Output: Integer
coding Hard Verified Question #4

4. [AI Enabled Coding] Rule Evaluator


Category: String coding problem

Question You need to build a rule evaluation system for a corporate credit card platform. Managers should be able to create rules that enforce...

Input: List
Output: Computed result
coding Hard tree #1

1. [Segment Tree] — Settle a delivery-payment ledger through arbitrary cutoffs


Background
Rippling's reported engineering interviews repeatedly feature driver registration, delivery billing, and payment settlement through a timestamp. This exercise models that payment-ledger challenge, which is relevant to payroll systems that must distinguish earned compensation from outstanding liabilities; it does not claim that Rippling operates a delivery service.
Problem statement
Implement a batch processor for a delivery-payment ledger. Operations must take effect in their original order, but the entire list is available upfront for preprocessing.
Each driver has a fixed hourly rate. A delivery earns compensation for its full duration, independently of every other delivery. To avoid rounding, all monetary results use cost units, where one cost unit equals 1/3600 of one cent. Therefore:
delivery_cost_units = rate_cents_per_hour * (end - start)
Support these operation records:
  • {"op": "register", "driver_id": string, "rate_cents_per_hour": integer}: Register a new driver. Return null.

  • {"op": "record", "driver_id": string, "start": integer, "end": integer}: Record a new, initially unpaid delivery. Return null.

  • {"op": "total"}: Return the cost of all recorded deliveries, including those already paid.

  • {"op": "unpaid"}: Return the cost of all currently unpaid deliveries.

  • {"op": "unpaid_through", "cutoff": integer}: Return the cost of currently unpaid deliveries whose end timestamp is at most cutoff, without changing the ledger.

  • {"op": "pay", "cutoff": integer}: Mark all currently unpaid deliveries whose end timestamp is at most cutoff as paid, and return the amount newly paid by this operation.


A payment is not a permanent watermark. A delivery recorded after a payment remains unpaid even if its end timestamp precedes that payment's cutoff. Cutoffs may decrease between operations. A delivery is never partially paid, and overlapping deliveries are billed independently. Every record operation represents a distinct delivery, even when its fields match an earlier record.
Return one result per operation. Your implementation must handle the maximum input size without scanning all deliveries for each query or payment.
Function or class signature
  • process_operations(operations: list[dict[str, str | int]]) -> list[int | None]


Example 1:
Input:
[
  {"op": "register", "driver_id": "d1", "rate_cents_per_hour": 3600},
  {"op": "register", "driver_id": "d2", "rate_cents_per_hour": 7200},
  {"op": "record", "driver_id": "d1", "start": 0, "end": 10},
  {"op": "record", "driver_id": "d2", "start": 5, "end": 15},
  {"op": "total"},
  {"op": "unpaid_through", "cutoff": 10},
  {"op": "pay", "cutoff": 10},
  {"op": "unpaid"},
  {"op": "pay", "cutoff": 10},
  {"op": "total"}
]

Output:
[null, null, null, null, 108000, 36000, 36000, 72000, 0, 108000]

Explanation: The deliveries cost 3600 * 10 = 36000 and 7200 * 10 = 72000 units. Only the first ends at or before timestamp 10. Paying it leaves 72000 units unpaid, and repeating that payment pays zero. Lifetime cost remains 108000 units.
Example 2:
Input:
[
  {"op": "register", "driver_id": "d", "rate_cents_per_hour": 1800},
  {"op": "record", "driver_id": "d", "start": 20, "end": 40},
  {"op": "pay", "cutoff": 100},
  {"op": "record", "driver_id": "d", "start": 0, "end": 10},
  {"op": "unpaid"},
  {"op": "unpaid_through", "cutoff": 5},
  {"op": "pay", "cutoff": 10},
  {"op": "pay", "cutoff": 100},
  {"op": "total"}
]

Output:
[null, null, 36000, null, 18000, 0, 18000, 0, 54000]

Explanation: The first delivery costs 1800 * 20 = 36000 units and is paid through timestamp 100. The late-recorded delivery costs 1800 * 10 = 18000 units and is still unpaid. Its end timestamp is 10, so querying through 5 returns zero and paying through 10 settles it. Lifetime cost is 36000 + 18000 = 54000 units.
Constraints:
  • 0 <= len(operations) <= 200000.

  • Driver IDs are strings of 1–64 characters. Each driver is registered exactly once before any delivery for that driver.

  • 1 <= rate_cents_per_hour <= 1000000.

  • Timestamps are integer seconds with 0 <= start < end <= 1000000000; cutoffs are integers in [0, 1000000000].

  • All records are valid and contain the fields specified for their operation. Total monetary values fit in a signed 64-bit integer.

  • Operations execute sequentially; there is no concurrency. Aim for O(n log n) total time and O(n) auxiliary space.


Follow-up:
What if operations arrive as an unbounded stream, so future end timestamps are unknown? Describe how to replace coordinate compression while preserving logarithmic-time prefix queries, prefix settlement, and insertion of late deliveries.
Want to practise this one?
Create a free account to open the full question and practise Rippling questions with AI.
Sign up free
coding Hard sliding window #2

2. [AI Enabled Coding] Trip Expense Policy Evaluator


Scenario


Rippling Spend helps finance teams enforce expense policies before approving employee reimbursements. Build an evaluator that explains individual expense violations, then extend it to detect trip-budget breaches and excessive entertainment spending across trips. You may use an AI assistant while coding, but you are responsible for correctness, extensibility, and complexity.

Part 1 — Individual expense rules


  • Input is a list of maps with string keys and string values. Each record contains id, employee_id, trip_id, category, amount, receipt, and timestamp; amounts are dollar strings such as "50.00", and timestamps are integer Unix seconds encoded as strings.

  • Apply all applicable rules independently; do not stop after the first violation:

- PROHIBITED_CATEGORY: category is exactly "alcohol", regardless of amount.
- MEAL_LIMIT: category is exactly "meal" and amount is strictly greater than "75.00".
- RECEIPT_REQUIRED: amount is at least "25.00" and receipt is "no".
  • Preserve input order in expense results. Sort each expense's violation codes lexicographically and include expenses with no violations.

  • Compare amounts using exact integer cents, not floating-point arithmetic. Use a rule interface or registry so adding another individual rule does not require rewriting the evaluator.


Function signature: evaluate_expenses(expenses: list[dict[str, str]])
The return type is up to the candidate. The examples use a JSON array of objects containing id and violations; use this representation when verifying the examples.

Example 1:


Input:
{
  "expenses": [
    {"id":"e1","employee_id":"u1","trip_id":"t1","category":"meal","amount":"75.00","receipt":"yes","timestamp":"0"},
    {"id":"e2","employee_id":"u1","trip_id":"t1","category":"meal","amount":"75.01","receipt":"yes","timestamp":"1"},
    {"id":"e3","employee_id":"u1","trip_id":"t1","category":"alcohol","amount":"10.00","receipt":"no","timestamp":"2"},
    {"id":"e4","employee_id":"u1","trip_id":"t1","category":"taxi","amount":"25.00","receipt":"no","timestamp":"3"},
    {"id":"e5","employee_id":"u1","trip_id":"t1","category":"entertainment","amount":"200.00","receipt":"yes","timestamp":"4"}
  ]
}

Output:
[
  {"id":"e1","violations":[]},
  {"id":"e2","violations":["MEAL_LIMIT"]},
  {"id":"e3","violations":["PROHIBITED_CATEGORY"]},
  {"id":"e4","violations":["RECEIPT_REQUIRED"]},
  {"id":"e5","violations":[]}
]

Explanation: A meal of $75.00 is allowed, but $75.01 exceeds the meal limit. Alcohol is prohibited even below the receipt threshold. The $25.00 taxi expense requires a receipt. Part 1 has no entertainment rule.

Part 2 — Cross-expense policy rules


Finance now needs rules whose scope is larger than one expense. Extend Part 1 without replacing its rules, and discuss how the return type changes before implementing the extension.
Add evaluate_policy(expenses: list[dict[str, str]]) with these requirements:
  • Keep every Part 1 expense result and violation.

  • TRIP_BUDGET: Sum all expenses for each trip_id. If the total is strictly greater than $1,000.00, emit one trip-level finding with trip_id, rule, total, limit, and expense_ids. Include all of that trip's expense IDs in input order. Do not duplicate this trip-level code onto individual expenses. Sort trip findings lexicographically by trip_id; format monetary totals with exactly two decimal places.

  • ENTERTAINMENT_24H: For each entertainment expense at timestamp t, sum that employee's entertainment expenses across all trips with timestamps in (t - 86400, t]. If the sum is strictly greater than $200.00, add this code to that expense's violations. Other categories do not receive this code.

  • Records can arrive out of timestamp order. All entertainment records with the same employee and timestamp must see the same complete window, including one another regardless of input order.

  • Every submitted expense contributes to applicable totals even if it violates another rule. This is a batch evaluator over the complete input, not a streaming approval system.

  • Make the design flexible enough to add future trip-level and cross-expense rules without modifying individual rules. Target O(n log n) time and O(n) space for the supplied rules; do not rescan an employee's history separately for every expense.


The examples use an object containing expenses and trip_violations.

Example 2:


Input:
{
  "expenses": [
    {"id":"a1","employee_id":"u1","trip_id":"t1","category":"entertainment","amount":"120.00","receipt":"yes","timestamp":"0"},
    {"id":"a2","employee_id":"u1","trip_id":"t2","category":"entertainment","amount":"90.00","receipt":"yes","timestamp":"3600"},
    {"id":"a3","employee_id":"u1","trip_id":"t1","category":"hotel","amount":"800.00","receipt":"yes","timestamp":"4000"},
    {"id":"a4","employee_id":"u1","trip_id":"t1","category":"taxi","amount":"100.00","receipt":"yes","timestamp":"5000"},
    {"id":"a5","employee_id":"u2","trip_id":"t3","category":"entertainment","amount":"200.00","receipt":"yes","timestamp":"3600"}
  ]
}

Output:
{
  "expenses": [
    {"id":"a1","violations":[]},
    {"id":"a2","violations":["ENTERTAINMENT_24H"]},
    {"id":"a3","violations":[]},
    {"id":"a4","violations":[]},
    {"id":"a5","violations":[]}
  ],
  "trip_violations": [
    {"trip_id":"t1","rule":"TRIP_BUDGET","total":"1020.00","limit":"1000.00","expense_ids":["a1","a3","a4"]}
  ]
}

Explanation: At a1, u1's entertainment total is $120.00. At a2, it is $120.00 + $90.00 = $210.00, so a2 violates the rolling cap even though the expenses belong to different trips. Employee u2 has a separate total of exactly $200.00, which is allowed. Trip t1 totals $120.00 + $800.00 + $100.00 = $1,020.00; trips t2 and t3 total $90.00 and $200.00.

Example 3:


Input:
{
  "expenses": [
    {"id":"b1","employee_id":"u1","trip_id":"tA","category":"entertainment","amount":"100.00","receipt":"yes","timestamp":"0"},
    {"id":"b3","employee_id":"u1","trip_id":"tB","category":"entertainment","amount":"100.00","receipt":"no","timestamp":"86400"},
    {"id":"b2","employee_id":"u1","trip_id":"tA","category":"entertainment","amount":"110.00","receipt":"yes","timestamp":"86400"},
    {"id":"b4","employee_id":"u1","trip_id":"tB","category":"entertainment","amount":"0.01","receipt":"yes","timestamp":"86401"},
    {"id":"b5","employee_id":"u1","trip_id":"tA","category":"hotel","amount":"790.00","receipt":"yes","timestamp":"86402"}
  ]
}

Output:
{
  "expenses": [
    {"id":"b1","violations":[]},
    {"id":"b3","violations":["ENTERTAINMENT_24H","RECEIPT_REQUIRED"]},
    {"id":"b2","violations":["ENTERTAINMENT_24H"]},
    {"id":"b4","violations":["ENTERTAINMENT_24H"]},
    {"id":"b5","violations":[]}
  ],
  "trip_violations": []
}

Explanation: At timestamp 86400, b1 is exactly 86400 seconds old and is excluded. Both same-timestamp records see $100.00 + $110.00 = $210.00, so both violate the entertainment cap. b3 also lacks a required receipt, but still contributes to the sum. At timestamp 86401, the entertainment total is $210.01. Trip tA totals $100.00 + $110.00 + $790.00 = $1,000.00 exactly, so it does not violate the trip budget; tB totals $100.01.

Notes:


  • There are 0–100,000 records from one organization. Expense IDs are unique, and a trip ID identifies one trip throughout the batch. Inputs are valid; categories are case-sensitive strings and receipts are either "yes" or "no".

  • Amounts are nonnegative dollar strings with exactly two decimal places, at most "1000000.00". Timestamps are integer strings between 0 and 10^12 inclusive.

  • Preserve input order even when computation requires sorting. Empty input produces [] in Part 1 and {"expenses":[],"trip_violations":[]} in Part 2.
coding Medium graph #3

3. Graph — Find the Shortest Path with Weight Constraints

Background: Rippling manages various payroll and human resource data for companies. A crucial feature is optimizing transportation costs associated with employee relocations. To solve this, we need a way to find the most efficient route based on weight constraints of packages.
Problem statement: You are given a directed graph where each edge has a weight representing the cost of transportation. Your task is to write a function that finds the shortest path from a given startNode to an endNode such that the total weight does not exceed a given weightLimit. If no such path exists, return None.
Function/class signature:
  • def shortest_path_with_weight_limit(graph: Dict[str, List[Tuple[str, int]]], startNode: str, endNode: str, weightLimit: int) -> Optional[List[str]]:

Example 1:
  • Input: graph = {'A': [('B', 5), ('C', 10)], 'B': [('C', 2)], 'C': []}, startNode = 'A', endNode = 'C', weightLimit = 8

  • Output: ['A', 'B', 'C']

  • Explanation: The path A -> B -> C has a total weight of 7 which is within the weight limit.

Example 2:
  • Input: graph = {'A': [('B', 5), ('C', 10)], 'B': [('C', 2)], 'C': []}, startNode = 'A', endNode = 'C', weightLimit = 6

  • Output: None

  • Explanation: No path from A to C exists under the weight limit of 6.

Constraints:
  • The graph contains at most 10^5 nodes.

  • Each edge has a weight from 1 to 100.

  • Weight limit will be a positive integer up to 500.

  • All nodes are unique strings without spaces.
coding Medium dynamic programming #4

4. Dynamic Programming — Minimum Cost to Hire Employees

Background: At Rippling, companies streamline their employee management processes, and finding the optimal way to hire employees while minimizing costs is crucial. This problem relates to the payroll management system involving salaries and hiring strategies.
Problem statement: You are given an array cost of size n where cost[i] represents the cost of hiring the i-th employee. You can hire employees in blocks (consecutive hires). Since hiring costs may vary, you want to determine the minimum total cost to hire all the employees. Implement a function min_cost(cost: List[int]) -> int that returns this minimum cost.
Function/class signature:
  • def min_cost(cost: List[int]) -> int:


Example 1:
  • Input: cost = [10, 20, 30]

  • Output: 60

  • Explanation: The total cost to hire all employees directly is 10 + 20 + 30 = 60.


Example 2:
  • Input: cost = [10, 30, 20, 40]

  • Output: 100

  • Explanation: Hiring in blocks optimally leads to minimum cost, which is sequential hire in this case.


Constraints:
  • 1 <= cost.length <= 1000

  • 1 <= cost[i] <= 1000

  • The total cost should account for different strategies in hiring based on competition and salary expectations.
coding Medium hash map #5

5. Coding Challenge — Implement an employee attendance system


Background: At Rippling, efficient employee management is crucial, especially in handling attendance for various purposes like payroll and compliance. An efficient solution can automate this process, ensuring that all records are accurate and accessible.
Problem statement: You are required to implement a class AttendanceSystem that tracks employee attendance. The class should support methods to mark attendance, check if an employee was present on a given day, and get the total attendance count for an employee. Each employee is identified by a unique employee ID.
Function/class signature:
  • def __init__(self):

  • def mark_attendance(self, employee_id: int, date: str) -> None:

  • def was_present(self, employee_id: int, date: str) -> bool:

  • def total_attendance(self, employee_id: int) -> int:


Example 1:
  • Input: mark_attendance(1, "2023-10-01")

  • Output: None

  • Explanation: Employee with ID 1 marked present on October 1st, 2023.


Example 2:
  • Input: was_present(1, "2023-10-01")

  • Output: True

  • Explanation: Employee 1 was present on October 1st, 2023.


Constraints:
  • employee_id is a positive integer.

  • date is formatted as "YYYY-MM-DD" and represents valid dates only.

  • The number of attendance records will not exceed 10^5.
coding Medium hash map #6

6. Coding Challenge — Find the Longest Consecutive Sequence

Background: As Rippling enhances its payroll processing system, it needs to analyze employee engagement data more effectively. Tracking consecutive active days of employees is essential for assessing participation in company initiatives.
Problem statement: Given an unsorted array of integers representing employee IDs, write a function that returns the length of the longest consecutive sequence of IDs. The sequence is defined as consecutive integers that differ by 1.
Function/class signature:
  • def longest_consecutive(nums: List[int]) -> int:

Example 1:
  • Input: [100, 4, 200, 1, 3, 2]

  • Output: 4

  • Explanation: The longest consecutive sequence is [1, 2, 3, 4], which has a length of 4.

Example 2:
  • Input: [1, 2, 0, 1]

  • Output: 3

  • Explanation: The longest consecutive sequence is [0, 1, 2], with a length of 3.

Constraints:
  • 0 <= len(nums) <= 10^5

  • -10^9 <= nums[i] <= 10^9
coding Hard graph #7

7. [OA] Dijkstra's Algorithm — Optimize Employee Benefits Allocation in Rippling’s Payroll System

Rippling aims to allocate benefits to employees based on their roles and locations efficiently.
Problem statement: You have a graph representing employees as nodes and available benefits as edges with weights belonging to those employees. Determine the minimum weight (cost) required to connect all benefits (nodes) starting from a specific employee node.
  • Method: minBenefitsCost(int start, List<List<int>> benefitsGraph) -> int - returns the minimum cost to connect all benefits.


Example 1:
Input: start = 0, benefitsGraph = [[0, 5, 10], [5, 0, 3], [10, 3, 0]]
Output: 8
Explanation: The optimal connections give a cost of 8 (via employee 1).
Example 2:
Input: start = 1, benefitsGraph = [[0, 2], [2, 0]]
Output: 2
Explanation: Only one connection is the minimum cost (from employee 1 to 0).
Constraints:
  • 1 ≤ benefitsGraph.length ≤ 1000

  • 1 ≤ benefitsGraph[i][j] ≤ 10^4
coding Hard sliding window #8

8. [OA] Sliding Window — Optimize the Time Tracking of Rippling's Employee Productivity

Rippling needs a solution to determine the longest sequence of time logs that maintain a consistent productivity rate when tracking employee hours.
Problem statement: Given an array of integers representing employee productivity per hour, find the longest contiguous subarray where the average productivity does not exceed a given threshold. The method should return the length of this subarray.
  • Method: longestSubarray(int[] productivity, int threshold) -> int - returns the length of the longest subarray where average productivity <= threshold.


Example 1:
Input: [1, 2, 3, 4, 2, 3], threshold = 3
Output: 4
Explanation: The longest subarray with an average ≤ 3 is [1, 2, 3, 4].
Example 2:
Input: [5, 1, 3, 2, 5, 4], threshold = 3
Output: 3
Explanation: The longest subarray with an average ≤ 3 is [1, 3, 2].
Constraints:
  • 1 ≤ productivity.length ≤ 10^6

  • 1 ≤ productivity[i] ≤ 100

  • 1 ≤ threshold ≤ 100
coding Hard graph #9

9. [OA] Graph Traversal — Find the shortest path to tax filing deadlines

Rippling offers tax filing services where users need to determine the shortest path to reach various filing deadlines based on their transaction history. Given a directed graph of filing options and their associated costs, compute the minimum cost to reach a specified deadline.
  • Function signature: def min_cost_path(graph: Dict[int, List[Tuple[int, int]]], start: int, end: int) -> int


Example 1:
Input: {0: [(1, 5), (2, 10)], 1: [(3, 2)], 2: [(3, 1)], 3: []}, 0, 3
Output: 7
Explanation: The shortest path is via node 0 to 1 to 3 with a total cost of 5 + 2 = 7.
Constraints:
  • 1 <= len(graph) <= 1000

  • Each node's neighbor list contains no more than 10 entries.
coding Hard dynamic programming #10

10. [OA] Dynamic Programming — Calculate the tax compliance score for Rippling users

In the context of Rippling's payroll and tax compliance services, we need an efficient way to determine the overall compliance score for a given user based on their transactions and filing history.
Given a list of user transactions and their corresponding compliance values, compute the maximum compliance score that can be achieved using at most one transaction from each period.
  • Function signature: def max_compliance_score(transactions: List[int]) -> int


Example 1:
Input: [10, 20, 15, 25, 30]
Output: 60
Explanation: The maximum compliance score is achieved by taking transactions with values 10, 20, and 30, leading to a total of 60.
Example 2:
Input: [5, 1, 2, 10]
Output: 15
Explanation: The transactions 5 and 10 yield the highest score of 15.
Constraints:
  • 1 <= len(transactions) <= 1000

  • 1 <= transactions[i] <= 10000

Related Rippling Software Engineer interview prep

Start practicing Rippling questions

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

Get Started Free