Infosys interview question

Three Coding question related to maths and graph