CapTech interview question

pretty simple string parsing coding problems