Reported July 2026
Confluentsimulation

Match a Variadic Function Signature

Reported by candidates from Confluent's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.

Get StealthCoderRuns invisibly during the live Confluent OA. Under 2s to a working solution.
Founder's read

The Confluent OA reported in July 2026 looks like a string problem, but the first attempt usually dies on one detail: a variadic final type has to appear at least once, never zero times. Miss that and [String, Integer] wrongly matches a call of [String]. The task is a linear scan over a function library, checking each signature against one call. No fancy data structure, just careful boundary logic. If you blank on the edge cases mid-assessment, StealthCoder runs invisibly on your desktop as a safety net and hands you a clean solution while the proctor sees nothing.

The problem

You are building a function library. Each registered function has a unique name, an ordered list of parameter-type tokens, and an isVariadic flag.
The four parallel inputs describe the library and one lookup:
functionNames[i] is the name of function i.
functionArgumentTypes[i] is its declared parameter-type list.
isVariadic[i] says whether its final declared parameter is variadic.
callArgumentTypes is the ordered argument-type list to match.
Return the names of all matching functions, in their original functionNames order.
Matching rules
Type tokens match by exact, case-sensitive string equality.
A non-variadic function matches only when its declared list has exactly the same length as the call and every token matches at the same position.
For a variadic function, the final declared type must occur one or more times. The call must therefore contain at least as many arguments as the declared list.
For a variadic declaration of length m, positions 0 through m - 2 must match the fixed prefix. Every call position from m - 1 onward must equal the final declared type.
For example, the variadic declaration [String, Integer] matches [String, Integer] and [String, Integer, Integer], but it does not match [String].

Function
findMatchingFunctions(functionNames: String[], functionArgumentTypes: String[][], isVariadic: boolean[], callArgumentTypes: String[]) → String[]

Examples
Example 1
functionNames = ["FuncA","FuncB","FuncC","FuncD","FuncE","FuncF","FuncG"]
functionArgumentTypes = [["String","Integer","Integer"],["String","Integer"],["Integer"],["Integer","Integer"],["Integer","Integer","Integer"],["String"],["Integer"]]
isVariadic = [false,true,true,true,false,false,false]
callArgumentTypes = ["String","Integer","Integer"]
return = ["FuncA","FuncB"]
FuncA is an exact three-parameter match. FuncB also matches because its final Integer parameter appears twice. Their names are returned in registration order.
Example 2
functionNames = ["FuncA","FuncB","FuncC","FuncD","FuncE","FuncF","FuncG"]
functionArgumentTypes = [["String","Integer","Integer"],["String","Integer"],["Integer"],["Integer","Integer"],["Integer","Integer","Integer"],["String"],["Integer"]]
isVariadic = [false,true,true,true,false,false,false]
callArgumentTypes = ["Integer"]
return = ["FuncC","FuncG"]
FuncC is variadic and its required final Integer appears once. FuncG is the exact one-parameter match.
Example 3
functionNames = ["FuncA","FuncB","FuncC","FuncD","FuncE","FuncF","FuncG"]
functionArgumentTypes = [["String","Integer","Integer"],["String","Integer"],["Integer"],["Integer","Integer"],["Integer","Integer","Integer"],["String"],["Integer"]]
isVariadic = [false,true,true,true,false,false,false]
callArgumentTypes = ["String"]
return = ["FuncF"]
FuncF is the only exact match. FuncB does not match because a variadic final parameter must occur at least once.

Constraints
1 <= functionNames.length == functionArgumentTypes.length == isVariadic.length <= 20000.
Function names are unique non-empty ASCII strings of at most 50 characters.
1 <= functionArgumentTypes[i].length, and the total number of declared type tokens is at most 200000.
0 <= callArgumentTypes.length <= 200000.
Every type token is a non-empty ASCII string of at most 50 characters.
Different functions may have identical signatures and flags; every matching name must still be returned.

Reported by candidates. Source: FastPrep

Pattern and pitfall

The pattern is plain simulation with array comparison. For each function, branch on the flag. Non-variadic: lengths must be equal, then every position must match. Variadic with declared length m: the call length n must be at least m, positions 0 through m-2 must match the prefix, and every position from m-1 to n-1 must equal the last declared type. The pitfall is the n >= m check. Skip it and a call shorter than the declaration slips through, which is exactly Example 3. Also don't build the result in a set or sort it, since order must follow functionNames. Complexity matters here. Each function costs at most O(n + m), and the constraints cap total declared tokens at 200000. A cheap early exit on the length check keeps you from scanning calls you can't match. If the live OA rattles you, StealthCoder is the hedge that covers the off-by-one.

If you see this problem in your OA tomorrow, the play is to recognize the pattern in 30 seconds. StealthCoder buys you that recognition.

If this hits your live OA

You can drill Match a Variadic Function Signature cold, or you can hedge it. StealthCoder runs invisibly during screen share and surfaces a working solution in under 2 seconds. The proctor sees the IDE. They don't see what's behind it. Built by an Amazon engineer who passed his OA cold and still thinks the filter is broken.

Get StealthCoder

Related leaked OAs

⏵ The honest play

You've seen the question. Make sure you actually pass Confluent's OA.

Confluent reuses patterns across OAs. Built by an Amazon engineer who passed his OA cold and still thinks the filter is broken. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Match a Variadic Function Signature FAQ

What's the trick in the Confluent variadic signature problem?+

The final variadic type must occur one or more times, so the call needs at least as many arguments as the declared list. Check that length first, then match the fixed prefix, then verify every remaining call argument equals the last declared type.

How hard is this problem really?+

Easy to medium. There's no advanced algorithm, just a linear scan per function. The difficulty is the boundary logic around the variadic case, and most failed attempts come from an off-by-one or a missing minimum length check.

Do I need a hash map or any special data structure?+

No. Iterate the functions in order, test each against the call, and append names to a list. Preserving the original order matters, so don't use a set or sort the output. Plain arrays and string equality are enough.

What edge cases should I test before submitting?+

Test an empty call list, a variadic function with a call shorter than its declaration, a variadic match with exactly m arguments, and duplicate signatures with different names. Also check case sensitivity, since tokens match by exact string equality.

How do I prepare for this in 48 hours?+

Write the matcher once from scratch, using the three examples as tests. Practice similar array-comparison problems with a length guard and a prefix loop. Focus on clean branching for the flag, not on memorizing any particular library or trick.

Problem reported by candidates from a real Online Assessment. Sourced from a publicly-available candidate-aggregated repository. Not affiliated with Confluent.

OA at Confluent?
Invisible during screen share
Get it