Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.IO;
- using System.Net;
- using System.Linq;
- namespace ConsoleApp1
- {
- static class Program
- {
- static void Main(string[] args)
- {
- StackedLinkedList list = new StackedLinkedList();
- list.push(11);
- list.push(22);
- list.push(33);
- list.push(44);
- list.display();
- Console.Write("\nTop element is {0}\n", list.peek());
- list.pop();
- list.pop();
- list.display();
- Console.Write("\nTop element is {0}\n", list.peek());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment