HCLTech interview question

Coding questions regarding data structures