Hot goIITian
an alternate method:
Same steps as above till we get
a2-2a+6
= [a2 - 2a + 1] - 1 + 6
= [a-1]2 + 5
which will have minimum value if [a-1]2 is smallest i.e. a = 1 and [a - 1]2 is 0
So a = 1