Some algorithms asked in interviews