using System;
using System.Collections.Generic;
public class Program
{
private static void PrintLinkedList(LinkedList<string> ll) {
foreach (string word in ll) {
Console.Write(word + " ");
}
Console.WriteLine();
}
public static void Main()
{
string[] arr = { "python", "c#", "c", "php", "nodejs", "java", "c", "c++" };
LinkedList<string> ll = new LinkedList<string>(arr);
LinkedListNode<string> current = ll.FindLast("c");
ll.Remove(current);
PrintLinkedList(ll);
}
}
/*
run:
python c# c php nodejs java c++
*/