Shiprocket Interview Question

Basic DSA puzzles, only pseudocodes