Amensys interview question

very hard technical questions to answer.