FastPrepData Pipeline Steps with Search and Run Order
Problems/Data Pipeline Steps with Search and Run Order

Data Pipeline Steps with Search and Run Order

Rippling logoRippling● MediumFULLTIMEPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Our version replays one list of operations on a pipeline of named steps: add, prefix search, remove and run planning. Every rule is our choice. The result strings are added or exists, removed or missing, comma-joined sorted names for search, and for run the steps that ran, a |, then the blocked steps in sorted order. A repeated add returns exists and changes nothing. Search results are sorted. A removed step's name stays in other steps' dependency lists. Dependencies on absent steps are ignored. The ready step with the earliest add goes first, where a re-added step counts from its latest add. Steps in a dependency loop, or waiting on one, are listed as blocked while the rest still run. The limits and the examples are ours too.

A post from October 2024 places this two-part task in a screening round.

The post covers a store with the usual add, search and delete actions, then a follow-up on running jobs in dependency order, and it notes that loops among the dependencies were the hard part. It gives no names, formats, limits or examples.

Our version is about 45% the same as the reported question.

You manage a data pipeline made of named steps, and a step may depend on other steps. Process the operations in order and return one result string for each operation.

  • "add" with args[i] = [name, dep1, dep2, ...]: if a step called name is stored, return "exists" and change nothing. Otherwise store it with the listed dependencies and return "added". A dependency may name a step that is not stored, and a step may even list itself.
  • "search" with [prefix]: return the names of stored steps that start with prefix, in sorted order, joined by commas. Return an empty string if none match.
  • "remove" with [name]: delete that step and return "removed", or return "missing" if it is not stored. Other steps keep name in their dependency lists.
  • "run" with []: plan a run of all stored steps, as described below, without changing anything.

To plan a run: a step is ready once every dependency that names a stored step has run. Dependencies that name steps not stored are ignored. Repeatedly run the ready step that was added earliest; a step that was removed and added again counts from its latest add. Steps that never become ready, because they are in a dependency loop or wait on one, are blocked.

The result of "run" is the steps that ran, in run order and joined by commas, then |, then the blocked steps in sorted order and joined by commas. For example "load,clean|" means both steps ran, and "w,v|x,y,z" means x, y and z are blocked.

Sorted order means plain string order: compare two names character by character using character codes, so digits come before letters, and a name comes before any longer name that starts with it. For example, d1 comes before d10, d10 comes before d9, and a1b2 comes before abc.

Function

runPipeline(operations: String[], args: String[][]) → String[]

Examples

Example 1

operations = ["add","add","add","add","search","run","remove","run"]args = [["load"],["clean","load"],["report","clean","load"],["audit","report"],["r"],[],["clean"],[]]return = ["added","added","added","added","report","load,clean,report,audit|","removed","load,report,audit|"]

Four steps are added. Only report starts with r. The first run goes load, clean, report, audit, and nothing is blocked. After clean is removed, report still lists clean, but clean is not stored any more, so that dependency is ignored: the second run goes load, report, audit.

Example 2

operations = ["add","add","add","add","add","run","add","search","remove","run"]args = [["x","z"],["y","x"],["z","y"],["w"],["v","w"],[],["w"],["w"],["y"],[]]return = ["added","added","added","added","added","w,v|x,y,z","exists","w","removed","z,x,w,v|"]

x waits for z, z waits for y and y waits for x: a loop. The first run can only do w and then v, so x, y and z are blocked (listed in sorted order). Adding w again returns exists. After y is removed, z is ready and so is w; z was added earlier, so it goes first. That makes x ready, and x was added before w, so x goes next. Then w and v.

Example 3

operations = ["add","add","run","remove","add","run","search","remove"]args = [["b"],["a"],[],["b"],["b"],[],["c"],["q"]]return = ["added","added","b,a|","removed","added","a,b|","","missing"]

a and b have no dependencies. b was added first, so it runs first. After b is removed and added again, it counts as added after a, so a runs first. No name starts with c, so the search returns an empty string. q is not stored, so removing it returns missing.

Constraints

  • 1 <= operations.length <= 1000 and args.length == operations.length
  • Each operations[i] is "add", "search", "remove" or "run".
  • For "add", 1 <= args[i].length <= 6. For "search" and "remove", args[i].length == 1. For "run", args[i].length == 0.
  • Every name, dependency and prefix has 1 to 8 characters, each a lowercase letter or a digit.
  • The dependency names in one "add" are all different.

More Rippling Phone Screen questions

  • Filter, Sort, and Deduplicate Scheduled TasksPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Stateful Log Transform and SearchPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Dependency-Aware Task SchedulerPHONE SCREEN · Seen Nov 2026
  • Delivery Cost Tracker with Effective-Dated RatesPHONE SCREEN · Seen Nov 2026
  • Camel CardsPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Best and Worst Camel Card CompletionsPHONE SCREEN · Seen Nov 2026
  • Corporate Card Expense RulesOA · PHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • In-Memory Priority Task SchedulerPHONE SCREEN · Seen Oct 2026
  • Limit an Organization Tree's HeightPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Median Across N Sorted ArraysPHONE SCREEN · Seen Oct 2026

Similar questions at other companies

  • Topological Sort with Secondary OrderingRoblox · PHONE SCREEN · ONSITE INTERVIEWRoblox interview questions
  • Lexicographically Smallest Topological OrderCoinbase · PHONE SCREENCoinbase interview questions
  • Task Build Order and File-Change RerunsVanta · PHONE SCREEN
  • Task Scheduler with Prerequisites and Execution PathsBrex · PHONE SCREEN
  • Course Schedule IIAmazon · PHONE SCREEN · ONSITE INTERVIEW
  • Lexicographically Smallest Topological OrderByteDance · PHONE SCREEN · ONSITE INTERVIEWByteDance interview questions
  • Merge Subsequences Into a Consistent Total OrderGoogle · PHONE SCREEN · ONSITE INTERVIEWGoogle interview questions
  • Lexicographic Dependency OrderIllumio · PHONE SCREENIllumio interview questions
  • Evaluate Formulas with Cycle DetectionInstacart · PHONE SCREEN · ONSITE INTERVIEWInstacart interview questions
  • Order Sources by Their DependenciesRetool · PHONE SCREENRetool interview questions

Interview reports that mention this question

  • Rippling KV and Music Screens: 33 Experiences (Part 4 of 12)
  • Rippling Full-Time SWE Interviews: 224 Experiences (Part 1 of 12)

Rippling interview experiences

  • Rippling No-Level Older Reports: 31 Experiences (Part 6 of 6)
  • Rippling No-Level Onsite Loops: 24 Experiences (Part 5 of 6)
  • Rippling No-Level Screens and Loops: 18 Experiences (Part 4 of 6)
  • Rippling No-Level Coding Screens: 37 Experiences (Part 3 of 6)
All Rippling interview questionsSee Rippling hiring insights
Saved
class Solution {
    public String[] runPipeline(String[] operations, String[][] args) {
        // Write your code here.
    }
}
Checking account…