Exemplo n.º 1
0
 static void Main(string[] args)
 {
     CircularLinkedList list = new CircularLinkedList("Head");
     list.AddNode("Arthur");
     list.AddNode("Shelley");
     list.AddNode("Jon");
     list.AddNode("Mel");
     list.AddNode("Jenny");
     list.PrintNodes();
     Console.WriteLine("Shelley: " + list.FindNodes("Shelley"));
     Console.WriteLine("Katie: " + list.FindNodes("Katie"));
     Console.WriteLine("Remove Jon: " + list.RemoveNode("Jon"));
     list.PrintNodes();
 }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            CircularLinkedList list = new CircularLinkedList("Head");

            list.AddNode("Arthur");
            list.AddNode("Shelley");
            list.AddNode("Jon");
            list.AddNode("Mel");
            list.AddNode("Jenny");
            list.PrintNodes();
            Console.WriteLine("Shelley: " + list.FindNodes("Shelley"));
            Console.WriteLine("Katie: " + list.FindNodes("Katie"));
            Console.WriteLine("Remove Jon: " + list.RemoveNode("Jon"));
            list.PrintNodes();
        }
 public void RemoveNodeTest()
 {
     CircularLinkedList target = new CircularLinkedList();
     string n = string.Empty;
     bool expected = false;
     bool actual;
     actual = target.RemoveNode(n);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }