Skip to content

Commit 600d7ae

Browse files
authored
Update README.md
1 parent 4180bdb commit 600d7ae

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

README.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@
22

33
A data structure is a particular way of organizing and storing data in a computer so that it can be accessed and modified efficiently. More precisely, a data structure is a collection of data values, the relationships among them, and the functions or operations that can be applied to the data.This repository contains **Java** based solutions to many popular data structures from coding interviews pov.
44

5+
### ✅ Data Structure Operations Complexity
6+
7+
| Data Structure | Access | Search | Insertion | Deletion | Comments |
8+
| ----------------------- | :-------: | :-------: | :-------: | :-------: | :-------- |
9+
| **Array** | 1 | n | n | n | |
10+
| **Stack** | n | n | 1 | 1 | |
11+
| **Queue** | n | n | 1 | 1 | |
12+
| **Linked List** | n | n | 1 | n | |
13+
| **Hash Table** | - | n | n | n | In case of perfect hash function costs would be O(1) |
14+
| **Binary Search Tree** | n | n | n | n | In case of balanced tree costs would be O(log(n)) |
15+
| **B-Tree** | log(n) | log(n) | log(n) | log(n) | |
16+
| **Red-Black Tree** | log(n) | log(n) | log(n) | log(n) | |
17+
| **AVL Tree** | log(n) | log(n) | log(n) | log(n) | |
18+
| **Bloom Filter** | - | 1 | 1 | - | False positives are possible while searching |
19+
520
### 🗃️ [Arrays](https://github.com/cs-cse/Java-DataStructures/tree/master/dsa-Arrays-Strings/src)
621
* An array is a collection of items stored at contiguous memory locations. The idea is to store multiple items of the same type together.
722
* For simplicity, we can think of an array as a fleet of stairs where on each step is placed a value (let’s say one of your friends). Here, you can identify the location of any of your friends by simply knowing the count of the step they are on.
@@ -88,19 +103,6 @@ A data structure is a particular way of organizing and storing data in a compute
88103
* A node's position in the tree defines the key with which that node is associated, which makes tries different in comparison to binary search trees, in which a node stores a key that corresponds only to that node.All descendants of a node have a common prefix of a String associated with that node, whereas the root is associated with an empty String.
89104

90105

91-
### ✅ Data Structure Operations Complexity
92106

93-
| Data Structure | Access | Search | Insertion | Deletion | Comments |
94-
| ----------------------- | :-------: | :-------: | :-------: | :-------: | :-------- |
95-
| **Array** | 1 | n | n | n | |
96-
| **Stack** | n | n | 1 | 1 | |
97-
| **Queue** | n | n | 1 | 1 | |
98-
| **Linked List** | n | n | 1 | n | |
99-
| **Hash Table** | - | n | n | n | In case of perfect hash function costs would be O(1) |
100-
| **Binary Search Tree** | n | n | n | n | In case of balanced tree costs would be O(log(n)) |
101-
| **B-Tree** | log(n) | log(n) | log(n) | log(n) | |
102-
| **Red-Black Tree** | log(n) | log(n) | log(n) | log(n) | |
103-
| **AVL Tree** | log(n) | log(n) | log(n) | log(n) | |
104-
| **Bloom Filter** | - | 1 | 1 | - | False positives are possible while searching |
105107

106108
### [Continue to Algorithms...](https://github.com/cs-cse/Java-Algorithms)

0 commit comments

Comments
 (0)