Unique prefix array problem

the code is not working for some inputs can you please point out the mistake and correct the code

Hey @Nishant_08 , You have asked this doubt again , is this resolved ?

yes it is resolved now and i have also marked it as resolved in the doubt section

Okay ! Thanks .
Let me know if you have any other queries .
Happy Coding :blush: