Write and explain gradient descent pseudocode | Amazon Interview Question