Back to problems

Variadic Function Matching

Algorithm · Confluent · Medium

Design a function library where you can record functions together with their argument type signatures, and later query which functions are compatible with a given list of argument types. Implement the FunctionLibrary class: FunctionLibrary(List > functions): Registers a set of functions. Each entry contains the function name, a variadic flag as a string ("true" or "false"), and the list of argument types. When a function is marked variadic, the final argument type in its…

Checking your access…