interviews icon indicating copy to clipboard operation
interviews copied to clipboard

Deque interface should be used instead of Stack class in sorting a stack

Open TanyaAgarwal28 opened this issue 4 years ago • 0 comments

Hi Stack class is used in sorting a stack u should use Deque interface instead of it because Stack has no interface, so if you know you need Stack operations you end up committing to a specific concrete class, which isn't usually a good idea.So I had make a pull request to change it #192

TanyaAgarwal28 avatar Mar 11 '21 12:03 TanyaAgarwal28