KPIT Technologies interview question

Array, string manipulation, stack creation