fix bug: replace Stack of stdlib with that of algs4