Are these sentences both correct and do they mean the same:
1-I did what I should have done.
2-I did what I had to do.
Not a teacher, nor a native.
To me, there is a difference.
I did what I should have done means that you did because it was right, or you think it was right.
I did what I had to do means that it was strongly necessary for you to do it, probably you had no choise.
I think this difference originates from the difference between 'should' and 'have to'.
Regards, Alex.