Algorithm For Implementing Stack Using List