UST interview question

Java based and dsa Array based