Infosys Interview Question

write a code for the buzz feed