Exemple #1
0
 public override void printLinkedList()
 {
     list.Clear();
     prev?.stringBackward();
     stringForward();
     WriteLine(list);
 }
Exemple #2
0
 private void stringBackward()
 {
     if (prev != null)
     {
         list.Insert(0, $"{data} --> ");
         prev.stringBackward();
     }
     else
     {
         list.Insert(0, $"{data} --> ");
     }
 }