Skip to content

Commit 82dc8c4

Browse files
committed
Add unimplemented cs classes to datastructures
1 parent cf9577f commit 82dc8c4

File tree

20 files changed

+197
-109
lines changed

20 files changed

+197
-109
lines changed

CSharpAlgorithms.DataStructures/Class1.cs

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace CSharpAlgorithms.DataStructures.disjoint_set
6+
{
7+
class DisjointSet
8+
{
9+
}
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace CSharpAlgorithms.DataStructures.disjoint_set
6+
{
7+
class DisjointSetItem
8+
{
9+
}
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace CSharpAlgorithms.DataStructures.graph
6+
{
7+
class Graph
8+
{
9+
}
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace CSharpAlgorithms.DataStructures.graph
6+
{
7+
class GraphEdge
8+
{
9+
}
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace CSharpAlgorithms.DataStructures.graph
6+
{
7+
class GraphVertex
8+
{
9+
}
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace CSharpAlgorithms.DataStructures.hash_table
6+
{
7+
class HashTable
8+
{
9+
}
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace CSharpAlgorithms.DataStructures.heap
6+
{
7+
class MinHeap
8+
{
9+
}
10+
}

CSharpAlgorithms.DataStructures/linked-list/LinkedList.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,8 @@ public LinkedListNode Find(object item)
109109
/// <summary>
110110
/// Delete the tail node
111111
/// </summary>
112-
/// <param name="node"></param>
113112
/// <returns></returns>
114-
public LinkedListNode DeleteTail(LinkedListNode node)
113+
public LinkedListNode DeleteTail()
115114
{
116115
var temp = Tail;
117116
if (Head == Tail)
@@ -142,9 +141,8 @@ public LinkedListNode DeleteTail(LinkedListNode node)
142141
/// <summary>
143142
/// Delete the head node
144143
/// </summary>
145-
/// <param name="node"></param>
146144
/// <returns></returns>
147-
public LinkedListNode DeleteHead(LinkedListNode node)
145+
public LinkedListNode DeleteHead()
148146
{
149147
if (Head == Tail)
150148
return null;
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace CSharpAlgorithms.DataStructures.priority_queue
6+
{
7+
class PriorityQueue
8+
{
9+
}
10+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace CSharpAlgorithms.DataStructures.queue
6+
{
7+
public class Queue
8+
{
9+
public linked_list.LinkedList list { get; set; }
10+
public Queue()
11+
{
12+
list = new linked_list.LinkedList();
13+
}
14+
15+
public bool IsEmpty()
16+
{
17+
return list.Tail == null;
18+
}
19+
20+
public object Peek()
21+
{
22+
if(list.Head == null){
23+
return null;
24+
}
25+
return list.Head.Item;
26+
}
27+
public void Enqueue(object item)
28+
{
29+
list.Append(item);
30+
}
31+
public object Dequeue()
32+
{
33+
var removedHead = list.DeleteHead();
34+
if(removedHead == null)
35+
{
36+
return null;
37+
}
38+
return removedHead.Item;
39+
}
40+
public override string ToString()
41+
{
42+
return list.ToString();
43+
}
44+
}
45+
}

CSharpAlgorithms.DataStructures/queue/Queue.js

Lines changed: 0 additions & 32 deletions
This file was deleted.

CSharpAlgorithms.DataStructures/queue/__test__/Queue.test.js

Lines changed: 0 additions & 65 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace CSharpAlgorithms.DataStructures.stack
6+
{
7+
class Stack
8+
{
9+
}
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace CSharpAlgorithms.DataStructures.tree
6+
{
7+
class BinaryTreeNode
8+
{
9+
}
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace CSharpAlgorithms.DataStructures.tree.avl_tree
6+
{
7+
class AvlTree
8+
{
9+
}
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace CSharpAlgorithms.DataStructures.tree.binary_search_tree
6+
{
7+
class BinarySearchTree
8+
{
9+
}
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace CSharpAlgorithms.DataStructures.tree.binary_search_tree
6+
{
7+
class BinarySearchTreeNode
8+
{
9+
}
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace CSharpAlgorithms.DataStructures.trie
6+
{
7+
class Trie
8+
{
9+
}
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace CSharpAlgorithms.DataStructures.trie
6+
{
7+
class TrieNode
8+
{
9+
}
10+
}

0 commit comments

Comments
 (0)