Coding questions asked in technical interviews and my attempts