← Back to experiences
[ OK ] Loaded —
[ INFO ]
$ cd
$ ls -lt
01
02
03
04
05
$ ls -lt
01
02
03
04
05
user@intervues:~/experiences/…$
OA : Two questions
Round 1: Given a set of patterns and a string. Remove given set of patterns from string and output the string without any trace of those patterns. For example: str = "aebcd", pattern = {"ad", "ec","b"} returns "" empty string Explanation: "aebcd" -> "aecd" -> "ad" -> ""
Note: I was not able to solve the question with optimised approach. Although it looks similar to Remove All Occurrences Of A Substring