Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
207 commits
Select commit Hold shift + click to select a range
fa8fbf1
Setting up GitHub Classroom Feedback
github-classroom[bot] Mar 13, 2024
4e40404
build: project init
D31IRIUM Mar 23, 2024
cf53686
feat: add RBNode
D31IRIUM Mar 23, 2024
0de843e
feat: add fun compareTo(), add generic type V for value
D31IRIUM Mar 24, 2024
86b461d
fix!: simplified version of Node (without value)
D31IRIUM Mar 24, 2024
8f7bb9f
feat: add simple version of fun add()
D31IRIUM Mar 24, 2024
fd9a2e3
feat: add simple version of fun max() and min()
D31IRIUM Mar 24, 2024
d02f041
feat: add simple version of fun root() and clear()
D31IRIUM Mar 24, 2024
d0726f8
feat: add simple version of fun find()
D31IRIUM Mar 24, 2024
3a2e5df
fix: add() correctly compares keys
D31IRIUM Mar 24, 2024
5c20be8
feat: add simple fun remove()
D31IRIUM Mar 24, 2024
1004576
refactor: package name xddcc -> treeLib
sgrishkova Mar 25, 2024
2d395c8
refactor: interface Tree created
sgrishkova Mar 25, 2024
34d0e5b
refactor!: setting up hierarchy
sgrishkova Mar 25, 2024
f5cb76c
feat: add simple TreeIterator class
D31IRIUM Mar 25, 2024
0c067eb
feat: add simple version of fun iterator()
D31IRIUM Mar 25, 2024
78eabed
feat: add fun addHelper() for fun add() :)
D31IRIUM Mar 25, 2024
8475334
fix: change field color: Color to red: Boolean
D31IRIUM Mar 25, 2024
5b6f444
fix: change fun addHelper() to balanceAdd()
D31IRIUM Mar 25, 2024
adf8de2
fix: remove replaced with removeOrNull in balanceAdd
D31IRIUM Mar 25, 2024
c5ad5a9
feat: add fun rotateRight() and rotateLeft()
D31IRIUM Mar 25, 2024
a1eef01
fix: rotation works properly if node is root
D31IRIUM Mar 25, 2024
cf9db46
feat: inorder traverse (avl)
sgrishkova Mar 26, 2024
7293b3d
feat: insert node (avl)
sgrishkova Mar 26, 2024
605014a
fix: add() can replace equal keys
D31IRIUM Mar 26, 2024
1f7bd20
feat: init tree (avl)
sgrishkova Mar 26, 2024
12b31fb
refactor: cleanup
sgrishkova Mar 26, 2024
6dbec76
feat: implement value in RBTree
D31IRIUM Mar 26, 2024
bbb37ec
feat: implement value field in RBNode
D31IRIUM Mar 26, 2024
b36fee4
feat: implement value
D31IRIUM Mar 26, 2024
19a5bd7
refactor: change name from red to isRed in RBNode
D31IRIUM Mar 26, 2024
5c8a0f4
feat: add fun attach()
D31IRIUM Mar 26, 2024
fc6fb28
fix!: initTree fun (avl) now is unable to accept random things as an …
sgrishkova Mar 26, 2024
ae998a6
feat: TreeIterator is compatible with binary trees
D31IRIUM Mar 26, 2024
d6cdc12
feat: now avl node can store parent
sgrishkova Mar 26, 2024
bcebba2
feat: add abstract class TreeNode
D31IRIUM Mar 26, 2024
335d55c
feat: left rotation for avl tree
sgrishkova Mar 26, 2024
037f1e3
feat: right rotation for avl tree
sgrishkova Mar 26, 2024
1aaa729
fix: change Node_T to Node_T? in attach method
D31IRIUM Mar 26, 2024
89a6c64
fix: RBNode implements TreeNode now
D31IRIUM Mar 26, 2024
8a7e633
feat: TreeBalancer interface
D31IRIUM Mar 26, 2024
4bbc667
feat: BinTree interface
D31IRIUM Mar 26, 2024
6da1a32
fix!: RBTree inherit from BinTree and TreeBalancer interfaces
D31IRIUM Mar 26, 2024
490a9d4
feat!: support for TreeNode interface (avl)
sgrishkova Mar 26, 2024
0cfa29e
feat: support for TreeIterator (avl)
sgrishkova Mar 26, 2024
61a730e
refactor: move Tree to interfaces package
sgrishkova Mar 26, 2024
cc7d1fe
feat!: add abstract TreeNode
sgrishkova Mar 26, 2024
0268148
fix!: avl inherits interface Tree now
sgrishkova Mar 26, 2024
3cfcc2b
docs: add description for class and it's methods
D31IRIUM Mar 26, 2024
2b9b796
fix: add missing methods and variables to Tree and AVLTree
sgrishkova Mar 26, 2024
fd4b45c
refactor: cleanup
sgrishkova Mar 26, 2024
92ec5f7
refactor: rename Tree -> BinTree
sgrishkova Mar 26, 2024
fda03b3
refactor: attach() and moveOn() become abstract fun
D31IRIUM Mar 26, 2024
a563e67
feat: add fun attach() and moveOn()
D31IRIUM Mar 26, 2024
e2c88d7
refactor: insert attach() method in add(), change returns
D31IRIUM Mar 26, 2024
694d768
refactor!!!: remove space
D31IRIUM Mar 26, 2024
8d115e1
feat!: fun search(key) (avl) now you can find node with key
sgrishkova Mar 26, 2024
cb39220
refactor: rewrite fun remove()
D31IRIUM Mar 26, 2024
a2f57d9
fix: return types
D31IRIUM Mar 26, 2024
f9a5091
refactor!: implement search for interface
sgrishkova Mar 26, 2024
073c75d
fix(avl): rotation func is not public anymore
sgrishkova Mar 26, 2024
9b0164b
refactor: cleanup
sgrishkova Mar 26, 2024
9978ed7
refactor: auto code reformat
sgrishkova Mar 26, 2024
912557c
refactor: rename package name
sgrishkova Mar 27, 2024
7f21504
Merge branch 'refs/heads/avl_tree' into avl_rbt_merge
sgrishkova Mar 27, 2024
dd7b0aa
fix!: compatibility (rbt)
sgrishkova Mar 27, 2024
a3b3a30
fix: compatibility (avl)
sgrishkova Mar 27, 2024
99b57be
refactor: rename size func
sgrishkova Mar 27, 2024
cba8ce4
refactor: auto code reformat + cleanup
sgrishkova Mar 27, 2024
93d7d6e
chore: add wrapper for height in AVLNODe
sgrishkova Mar 27, 2024
2f2e03b
refactor: fun height(avl) now in the tree, notin the node
sgrishkova Mar 27, 2024
6cf946b
chore: add helper fun bFactor (avl)
sgrishkova Mar 27, 2024
0d7ec55
chore: add helper fun fixHeight (avl)
sgrishkova Mar 27, 2024
fe3c8e2
feat: now AVL nodes can balance themselves
sgrishkova Mar 27, 2024
b2ef746
fix: now add in AVL tree is balanced
sgrishkova Mar 27, 2024
70912dd
refactor(avl): small changes in private methods regarding null check
sgrishkova Mar 28, 2024
fff057f
fix (avl): avl node no longer stores the parent node
sgrishkova Mar 28, 2024
13be6bb
refactor(avl): rename variables in rotation functions
sgrishkova Mar 28, 2024
6a718d9
fix(avl): now rotation methods fix height of nodes after rotation
sgrishkova Mar 28, 2024
34f4a4c
refactor: rename method search
sgrishkova Mar 28, 2024
3565aed
refactor(avl): add methods for big rotations, modifying balance method
sgrishkova Mar 28, 2024
02bbd99
refactor: methods attach and moveOn no longer in the TreeNode
sgrishkova Mar 28, 2024
1a179d0
refactor(bst node): cleanup
sgrishkova Mar 28, 2024
f25fde9
fix: change visibility modifier
D31IRIUM Mar 28, 2024
03e82d6
feat: add fun changeVal()
D31IRIUM Mar 28, 2024
458336c
feat: add fun preOrderIterator() and postOrderIterator()
D31IRIUM Mar 28, 2024
49f5ee3
fix(avl): from now on tree balances properly
sgrishkova Mar 28, 2024
0000931
feat(avl): now tree can return amount of stored nodes
sgrishkova Mar 28, 2024
f76eec7
feat(avl): remove method available
sgrishkova Mar 28, 2024
e2332ee
feat and fix: add BSTree and deleted unnecessary code
IslamZZZZ Mar 29, 2024
862c3b5
feat: add fun remove() and balancerRemove()
D31IRIUM Mar 30, 2024
18bdbab
Merge remote-tracking branch 'refs/remotes/origin/bs_baum' into avl_r…
sgrishkova Mar 30, 2024
86b5989
refactor: rename helper method for height method
sgrishkova Mar 30, 2024
20ea3c4
refactor (avl): implement more efficient height method for abl tree
sgrishkova Mar 30, 2024
19f5d37
fix: small compatibility changes
sgrishkova Mar 30, 2024
3f5d8b2
reformat: auto code reformat
sgrishkova Mar 30, 2024
ed77c40
fix: expanded types for node in rotation funs
D31IRIUM Mar 30, 2024
bd1a0be
refactor: prettier balancerAdd()
D31IRIUM Mar 30, 2024
cf7b110
fix: take fun attach() and moveOn() from RBNode to TreeNode
D31IRIUM Mar 30, 2024
46229ab
fix: key is var now
D31IRIUM Mar 30, 2024
88f0ad6
fix: change RBNode to Node_T
D31IRIUM Mar 30, 2024
4e3bb4a
fix!: root no more public
sgrishkova Mar 31, 2024
580335e
refactor!: add returns nod instead of the added nod's value
sgrishkova Mar 31, 2024
fb4a420
refactor: delete fun balancerAdd() and balancerRemove()
D31IRIUM Mar 31, 2024
f22445f
fix: moveOn() return correct type
D31IRIUM Mar 31, 2024
a86fe75
feat: rewrite fun remove() and balancerRemove()
D31IRIUM Mar 31, 2024
5512239
Merge branch 'avl_rbt_merge' into rbtree
D31IRIUM Mar 31, 2024
b8146a0
Merge pull request #3 from spbu-coding-2023/rbtree
D31IRIUM Mar 31, 2024
d262d43
refactor!(all): root method returns node instead of the Pair<key, value>
sgrishkova Mar 31, 2024
e161a35
fix(avl): add function now initializes a tree root when used on the e…
sgrishkova Mar 31, 2024
6510357
refactor: rewrite fun equals()
D31IRIUM Mar 31, 2024
22aa08a
feat: add fun toString()
D31IRIUM Mar 31, 2024
087942d
fix: change return value for add()
D31IRIUM Mar 31, 2024
fcce198
refactor: rewrite fun equals() (again)
D31IRIUM Mar 31, 2024
c67724a
refactor: minor clean up
D31IRIUM Mar 31, 2024
fbef425
refactor(avl): helper func
sgrishkova Mar 31, 2024
09bb6a6
Merge remote-tracking branch 'origin/avl_rbt_merge' into avl_rbt_merge
sgrishkova Mar 31, 2024
486c2b8
fix: small compatibility fixes
sgrishkova Mar 31, 2024
a969df5
feat and refactor: add new methods to BS node and tree
IslamZZZZ Mar 31, 2024
5c67b7f
refactor: simplified balancerAdd() (mostly for tests)
D31IRIUM Mar 31, 2024
1808a60
refactor: change descriptions and removedNode declaration in remove()
D31IRIUM Mar 31, 2024
dffbd8a
fix: change type from pair<K, V> to Node
D31IRIUM Mar 31, 2024
44d2bf0
fix: correct root remove
D31IRIUM Mar 31, 2024
959590b
fix(avl): now tree can change root when balancing
sgrishkova Mar 31, 2024
ef37bda
refactor: min / max return node instead of pair(key, value)
sgrishkova Mar 31, 2024
82a0c24
fix: countNodes returns proper value
sgrishkova Mar 31, 2024
d6d09ab
build: add AVL tests
sgrishkova Mar 31, 2024
2a8c8ef
Merge pull request #4 from spbu-coding-2023/avl_rbt_merge
sgrishkova Apr 1, 2024
2887570
detekt
sgrishkova Apr 1, 2024
edfa089
Merge pull request #5 from spbu-coding-2023/sgrishkova-patch-1
sgrishkova Apr 1, 2024
dc72345
ci: create workflow for running tests with coverage
sgrishkova Apr 1, 2024
729e7bd
fix: test workflow file
sgrishkova Apr 1, 2024
a49ed74
feat: add tests for RBTree
D31IRIUM Apr 1, 2024
e8f7a5a
build: add build.gradle.kts
sgrishkova Apr 1, 2024
d79bd8c
fix: test workflow file
sgrishkova Apr 1, 2024
5a64af8
ci: rename detekt workflow test
sgrishkova Apr 1, 2024
bbc4c60
fix: fixed huge amount of mistakes and added nessecary file THAT SOME…
IslamZZZZ Apr 1, 2024
e5912b4
Merge branch 'avl_rbt_merge' into bs_baum
IslamZZZZ Apr 1, 2024
cf49ddf
Merge pull request #6 from spbu-coding-2023/bs_baum
IslamZZZZ Apr 1, 2024
efd8517
feat: add fun toPair()
D31IRIUM Apr 1, 2024
ae7e6a1
fix: change the way nodes replace each other in remove()
D31IRIUM Apr 1, 2024
8ca1a6d
refactor: add return types
D31IRIUM Apr 1, 2024
9e09724
ci: change jacoco reports paths
sgrishkova Apr 1, 2024
e112563
Update test_with_coverage.yml
sgrishkova Apr 1, 2024
b70f34a
fix: setting up the test workflow
sgrishkova Apr 1, 2024
b6cd58f
fix: enable xml reports
sgrishkova Apr 1, 2024
446e327
fix: split test and coverage
sgrishkova Apr 1, 2024
5d068e9
fix: rename workflow yml file for test
sgrishkova Apr 1, 2024
34db48f
ci: JaCoCo PR coverage workflow
sgrishkova Apr 1, 2024
f84ad88
Merge remote-tracking branch 'refs/remotes/origin/main' into work
sgrishkova Apr 1, 2024
96e3643
reformat: auto code reformat
sgrishkova Apr 1, 2024
a52e866
feat and fix: added not-done test and fixed mistakes that test showed
IslamZZZZ Apr 2, 2024
2206d38
feat and fix: added test to BST and fixed some mistakes
IslamZZZZ Apr 2, 2024
a12d0b5
fix(avl): now remove deletes root node properly
sgrishkova Apr 2, 2024
1be3a54
fix(avl): now remove deletes root node properly
sgrishkova Apr 2, 2024
4f02c3c
built: Create README.md
sgrishkova Apr 2, 2024
2d22dce
Merge pull request #9 from spbu-coding-2023/avlTree
sgrishkova Apr 2, 2024
1976c84
fix: no more test workflow doubles
sgrishkova Apr 2, 2024
31a9583
fix: now coverage updates report, not creates a new one
sgrishkova Apr 2, 2024
d861065
fix: fix title in coverage report
sgrishkova Apr 2, 2024
53c45a3
fix: ended tests on remove and added ability to remove root by remove…
IslamZZZZ Apr 2, 2024
f692555
feat and fix: added test on findParent and SubTree methods and fixed …
IslamZZZZ Apr 2, 2024
31dd6b2
merging work with main
IslamZZZZ Apr 2, 2024
ccf2d03
fix: removed unnecessary code
IslamZZZZ Apr 2, 2024
61ed903
fix and refactor!: balanceRemove works correctly now
D31IRIUM Apr 2, 2024
579145e
feat: add tests for remove() and balancerRemove()
D31IRIUM Apr 2, 2024
449b162
Merge remote-tracking branch 'origin/work' into work
D31IRIUM Apr 2, 2024
12ac10f
Merge pull request #11 from spbu-coding-2023/work
D31IRIUM Apr 2, 2024
304afe0
refactor: new commentaries
D31IRIUM Apr 2, 2024
448850a
feat: add more tests for remove()
D31IRIUM Apr 2, 2024
9cc8eaa
feat: add fun key() and value()
D31IRIUM Apr 2, 2024
6b32a00
feat: tests for nodes
D31IRIUM Apr 2, 2024
5f44d7a
refactor: nested tests
D31IRIUM Apr 2, 2024
450d301
fix: covered more code and fixed unreachable code
IslamZZZZ Apr 2, 2024
3b693ee
feat: add tests for iterator
D31IRIUM Apr 2, 2024
9e3f9b4
Merge pull request #12 from spbu-coding-2023/work
D31IRIUM Apr 2, 2024
863ce0b
fix: little changes and test on BSTNode single method
IslamZZZZ Apr 2, 2024
0871b3f
Merge branch 'main' of github.com:spbu-coding-2023/trees-4 into main
IslamZZZZ Apr 2, 2024
07e8e2f
ci: coverage.yml minor fix
sgrishkova Apr 3, 2024
a6d86bc
Add LICENSE
sgrishkova Apr 3, 2024
d943966
refactor: add few more descriptions
D31IRIUM Apr 3, 2024
185cf63
Update readme
sgrishkova Apr 3, 2024
063c4ee
refactor: better tests
D31IRIUM Apr 3, 2024
04be228
fix: assert height in addMany() test
D31IRIUM Apr 3, 2024
387bff2
refactor: add brackets in equals()
D31IRIUM Apr 3, 2024
217fb5b
Merge pull request #13 from spbu-coding-2023/work
D31IRIUM Apr 3, 2024
50bcccc
ci: rename run detekt workflow
sgrishkova Apr 3, 2024
ace3896
feat: add description README.md
D31IRIUM Apr 3, 2024
bfa3d61
fix: better looks
D31IRIUM Apr 3, 2024
677d8fe
feat: add 'how to use' article
D31IRIUM Apr 3, 2024
ef2ddb5
fix: no more test doubles
sgrishkova Apr 3, 2024
65a1410
ci: config coverage output
sgrishkova Apr 3, 2024
e584f22
fix: minor fixes in readme
sgrishkova Apr 3, 2024
e03be35
fix: deleted method isThereChild because I was forced to do this
IslamZZZZ Apr 3, 2024
745ce48
fix!: rbt root no longer public
sgrishkova Apr 4, 2024
88ee8b6
refactor: code format
D31IRIUM Apr 4, 2024
04d7709
Apply suggestions from code review (AVL, abstract node and interfaces)
sgrishkova Apr 6, 2024
101df08
Merge remote-tracking branch 'origin/main'
sgrishkova Apr 6, 2024
acc5f64
fix: fix cod according to review's critic
IslamZZZZ Apr 6, 2024
228e036
refactor: add spaces between logical blocks in code, less nesting in …
D31IRIUM Apr 7, 2024
8e4f329
Merge remote-tracking branch 'origin/main'
D31IRIUM Apr 7, 2024
67f1dfa
preparing for later changes
IslamZZZZ Oct 26, 2024
c339836
added test and corrected X function
IslamZZZZ Oct 28, 2024
3a4d514
Almost endded Testing adding and removing and corrected them
IslamZZZZ Oct 28, 2024
56203f3
Almost finished tests and corrected remove and add methods
IslamZZZZ Oct 28, 2024
177dfc9
refactor
IslamZZZZ Oct 31, 2024
e27cbdc
Merge pull request #14 from spbu-coding-2023/Treap
IslamZZZZ Oct 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Measure coverage

on:
pull_request:

jobs:
build:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Run Test
run: |
chmod +x gradlew
./gradlew test
- name: JaCoCO Coverage
id: jacoco
uses: Madrapps/[email protected]
with:
paths: |
${{ github.workspace }}/build/reports/jacoco/test/jacocoTestReport.xml
token: ${{ secrets.GITHUB_TOKEN }}
skip-if-no-changes: true


11 changes: 11 additions & 0 deletions .github/workflows/format_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Run detekt - static code analyzer
on:
push:
jobs:
detekt:
runs-on: ubuntu-latest
steps:
- name: "checkout"
uses: actions/checkout@v2
- name: "detekt"
uses: natiginfo/[email protected]
22 changes: 22 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Test

on:
push:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Setup JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build with Gradle
run: ./gradlew build
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
### Gradle ###
.gradle
build
build.gradle.kts
gradle.properties

### IntelliJ IDEA ###
.idea
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Magomedov Islam, Damir Yunusov, Sofya Grishkova

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
77 changes: 77 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/) [![CodeFactor](https://www.codefactor.io/repository/github/spbu-coding-2023/trees-4/badge)](https://www.codefactor.io/repository/github/spbu-coding-2023/trees-4)

## About Tree Lib

Tree Lib is the kotlin library for working with 3 different binary tree implementations: Binary Search Tree (BST),
AVL-Tree (AVL) and Red-Black Tree (RB).

## How to use

To init an object, you must provide key and value type.

```
val treeExample: BSTree<<Key>, <Value>>
```

for example

```
val treeExample = BSTree<String, Double>()
```

All trees supports basic methods:

- Add values and keys as nodes to the tree:

`treeExample.add(key: "abc", value: 1.0)`

- Change node's value:

`treeExample.changeVal(key: "abc", value: 37.7)`

- Remove node from the tree:

`treeExample.remove(key: "Choose wisely.")`

- Find node by key:

`treeExample.findByKey(key: "Anything you can compare!")`

- Iterate in tree:

`for (node in treeExample) { ...`

- ...and much more!

With binary trees, Tree Lib provides a node type for each of them.
You can read node's key and value(with key() and value() methods), compare
them between each other(although they must share same type), convert them to
pair(toPair()) or string(toString()).

## License

Distributed under the MIT License. See `LICENSE.txt` for more information.

## Contact

This library was created by:

* Magomedov Islam (tg @JapEmpLove) - BST
* Damir Yunusov (tg @TopographicOcean) - RB
* Sofya Grishkova (tg @tea_jack) - AVL

## Acknowledgments

[README Template](https://github.com/othneildrew/Best-README-Template)

Links to Wikipages about binary trees:

* [Binary Tree](https://en.wikipedia.org/wiki/Binary_tree)
* [Binary Search Tree](https://en.wikipedia.org/wiki/Binary_search_tree)
* [Red-Black Tree](https://en.wikipedia.org/wiki/Red%E2%80%93black_tree)
* [AVL-Tree](https://en.wikipedia.org/wiki/AVL_tree)

[Here](https://www.geeksforgeeks.org/applications-advantages-and-disadvantages-of-binary-search-tree/) are provided
applications, advantages and disadvantages of Binary Search Tree

Good [Habr article](https://habr.com/ru/articles/150732/) about AVL-Trees
39 changes: 39 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
plugins {
kotlin("jvm") version "1.9.23"
jacoco
}

group = "org.example"
version = "1.0-SNAPSHOT"

repositories {
mavenCentral()
}

dependencies {
testImplementation("org.jetbrains.kotlin:kotlin-test-junit5")
testImplementation("org.junit.jupiter:junit-jupiter-engine:5.9.2")
}

tasks.test {
useJUnitPlatform()
finalizedBy(tasks.jacocoTestReport)
}
tasks.jacocoTestReport {
dependsOn(tasks.test)
reports {
xml.required = true
csv.required = false
html.required = false
html.outputLocation = layout.buildDirectory.dir("jacoco")
}
}

kotlin {
jvmToolchain(21)
}

jacoco {
toolVersion = "0.8.11"
reportsDirectory = layout.buildDirectory.dir("reports/jacoco")
}
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Sat Mar 23 10:46:13 MSK 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading
Loading