V2S Technologies interview question

it was python data structure question