Ui Path [Reject] phone interview
Anonymous User
1310

Given an array of substrings ,find if a string is possible from the substrings.

e.g.
String: Calfornia
arr: ['Cal','ifor','nia']
output: true

String: Calfornia
arr: ['Cal','ifor','Cali']
output: false

Finding all permutation with backtracking seems to be full proof solution but i thought about it after the interview. I tried using pointer solution but the solution was messed up because there could be duplicate strings which are off by an index.

Comments (3)