Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
remove duplicates
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using COLG = System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Node { public int data; public Node next; public Node (int value, Node nextNode) { data = value; next = nextNode; } } public class Program { public Node RemoveDuplicates (Node head) { COLG.List<Node> knownNodes = new COLG.List<Node>(); Node focus = head; while (focus != null) { if (knownNodes.Exists(x => x.data == focus.data)) { knownNodes.Add(focus); } else { } } } public static void Main(string[] args) { //Your code goes here Console.WriteLine("Hello, world!"); } } }
run
|
edit
|
history
|
help
0
sadxasxd
Type win
Simple Constructor Implementation
Proj2
Generics
bubble sort
sdfghjuyhtgrfedsdf
Hack
Hello world test
Bubble Sort