← Back to companies
[ OK ] Loaded —
[ INFO ]
$ cd
$ ls -lt
01
02
03
04
05
$ ls -lt
01
02
03
04
05
user@intervues:~/$
Implement a simple template engine that takes a template string and a dictionary of variables, and returns the template with all variables replaced by their corresponding values. Variables in the template are denoted by curly braces, e.g., {name}. If a variable is not found in the dictionary, replace it with an empty string. The engine should handle nested variables: if after a first substitution pass the result still contains variables, perform another pass. This continues until no variables remain or until no more substitutions can be made.