EB
Junebug
@endoBiologist
not your average egbert, but not too different either.
playing modded slay the spire 2 and watching inscryption kaycee's mod gameplay on youtube. i've really fallen for the deck builders
Kult: +10
Kull: +5
Total: 15
Ratio: 2.00
so there are other transfem egberts out here!
maybe i should change my name. i don't know if june feels right anymore.
Kult: +17
Kull: +10
Total: 27
Ratio: 1.70
thinking about dying my hair. should i go blue or pink? cause blue is the classic, can't go wrong with blue, but i feel like mixing it up a bit. not sure though!!!!!!!!
Kult: +15
Kull: +15
Total: 30
Ratio: 1.00
hi, you probably know like a hundred of me. i'll be over here.
Kult: +10
Kull: +10
Total: 20
Ratio: 1.00
var list = new MyLinkedList();
list.Append("i"); list.Append("have"); list.Append("created"); list.Append("the"); list.Append("absolute"); list.Append("most"); list.Append("obnoxious"); list.Append("quirk"); list.Append("of"); list.Append("all"); list.Append("time."); list.Append("this"); list.Append("site"); list.Append("sure"); list.Append("is"); list.Append("interesting!"); list.Append("don't"); list.Append("worry,"); list.Append("i'm"); list.Append("not"); list.Append("going"); list.Append("to"); list.Append("use"); list.Append("it"); list.Append("for"); list.Append("more"); list.Append("than"); list.Append("just"); list.Append("this"); list.Append("post.");
Console.WriteLine(list.ToString());
public class MyLinkedList
{
private class Node
{
public int Val;
public Node? Next;
public Node(int val)
{
Val = val;
}
}
private Node? head;
private Node? tail;
private int count;
public int GetCount()
{
return count;
}
public int GetHead()
{
return head.Val;
}
public int GetTail()
{
return tail.Val;
}
public void Append(int val)
{
Node node = new Node(val);
if(head == null)
{
head = node;
tail = node;
}
else
{
tail?.Next = node;
tail = node;
}
count++;
}
public void Insert(int index, int val)
{
if(index < 0 || index > count)
{
Console.WriteLine("Index is incorrect");
return;
}
Node newNode = new Node(val);
if(index == 0)
{
newNode.Next = head;
head = newNode;
count++;
return;
}
else if(index == count)
{
Append(val);
}
else
{
Node curNode = head;
for(int i = 0; i < index - 1; i++)
{
curNode = curNode.Next;
}
newNode.Next = curNode.Next;
curNode.Next = newNode;
count++;
return;
}
}
public void Remove(int val)
{
if(head == null)
{
return;
}
if(head.Val == val)
{
head = head.Next;
if(head == null)
{
tail = null;
}
count--;
return;
}
Node? beforeNode = head;
while(beforeNode.Next != null)
{
if(beforeNode.Next.Val == val)
{
if(beforeNode.Next == tail)
{
tail = beforeNode;
}
beforeNode.Next = beforeNode.Next.Next;
count--;
return;
}
beforeNode = beforeNode.Next;
}
return;
}
public void Clear()
{
head = null;
tail = null;
count = 0;
}
public override string ToString()
{
string result = "";
Node? current = head;
while(current != null)
{
if(result != "")
{
result += " -> ";
}
result += current.Val;
current = current.Next;
}
return result;
}
}
Kult: +5
Kull: +5
Total: 10
Ratio: 1.00



