JPMorganChase interview question

They tested string algorithm questions