Skip to content

Commit 0c971e1

Browse files
Update README.md
1 parent 32630f1 commit 0c971e1

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,4 +608,40 @@ sequenceDiagram
608608

609609
</h3>
610610
<h1 align="center"> TreeSet Functionality: </h1>
611+
612+
```mermaid
613+
614+
sequenceDiagram
615+
616+
617+
java.lang.Object->>java.util.AbstractCollection:
618+
java.util.AbstractCollection->>java.util.AbstractSet:
619+
java.util.AbstractSet->>java.util.TreeSet:
620+
```
621+
<h3> Def: Java TreeSet class implements the Set interface that uses a tree for storage. It inherits AbstractSet class and implements the NavigableSet interface. The objects of the TreeSet class are stored in ascending order. </h3>
622+
623+
<table>
624+
<tr>
625+
<th>Interface</th>
626+
<th>Hash Table</th>
627+
<th>Resizable Array</th>
628+
<th>Balanced Tree</th>
629+
<th>Linked List</th>
630+
</tr>
631+
<tr>
632+
<td >Set</td>
633+
<td >HashSet</td>
634+
<td ></td>
635+
<td >TreeSet</td>
636+
<td ></td>
637+
</tr>
638+
</table>
639+
640+
<h3> Continuing...: Java TreeSet class implements most of the functions that Hash Set uses as given below: </h3>
641+
642+
<ul>
643+
<li><h3><a href= "https://github.com/AvinandanBose/JavaCollectionFramework/blob/main/TreeSetDemo.java" > Tree Set Functions-1</a></h3></li>
644+
</ul>
645+
646+
611647
</ul>

0 commit comments

Comments
 (0)