Skip to content

Commit 4633f44

Browse files
authored
add .net datastructure
1 parent a2176ff commit 4633f44

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,20 @@ Sample :
3131

3232
# Data Structures
3333

34+
## .net framework Data structure
35+
36+
| | Internal Implement- ation | Add/insert | Add beyond capacity | Queue/Push | Dequeue/Pop/Peek | Remove/ RemoveAt | Item[index]/ElementAt(index) | GetEnumerator | Contains(value)/IndexOf/ContainsValue/Find |
37+
|------------------|-----------------------------------------------------------|----------------------------------------|---------------------|------------|------------------|-------------------------------|------------------------------|---------------|--------------------------------------------|
38+
| List | Array | O(1) to add, O(n) to insert | O(n) | - | - | O(n) | O(1) | O(1) | O(n) |
39+
| LinkedList | Doubly linked list | O(1), before/after given node | O(1) | O(1) | O(1) | O(1), before/after given node | O(n) | O(1) | O(n) |
40+
| Stack | Array | O(1) | O(n) | O(1) | O(1) | - | - | O(1) | O(n) |
41+
| Queue | Array | O(1) | O(n) | O(1) | O(1) | - | - | O(1) | O(n) |
42+
| Dictionary | Hashtable with links to another array index for collision | O(1), O(n) if collision | O(n) | - | - | O(1), O(n) if collision | O(1), O(n) if collision | O(1) | O(n) |
43+
| HashSet | Hashtable with links to another array index for collision | O(1), O(n) if collision | O(n) | - | - | O(1), O(n) if collision | O(1), O(n) if collision | O(1) | - |
44+
| SortedDictionary | Red-black tree | O(log n) | O(log n) | - | - | O(log n) | O(log n) | O(log n) | O(n) |
45+
| SortedList | Array | O(n), O(log n) if added to end of list | O(n) | - | - | O(n) | O(log n) | O(1) | O(n) |
46+
| SortedSet | Red-black tree | O(log n) | O(log n) | - | - | O(log n) | O(log n) | O(log n) | - |
47+
3448
## Set
3549

3650
- Union Find : :white_medium_square:

0 commit comments

Comments
 (0)