Algorithm For Stack Implementation In Data