https://github.com/zhimbura/lca-multiple-algorithm
Algorithm for finding the least common parent for multiple nodes in one tree pass
https://github.com/zhimbura/lca-multiple-algorithm
example lca
Last synced: about 2 months ago
JSON representation
Algorithm for finding the least common parent for multiple nodes in one tree pass
- Host: GitHub
- URL: https://github.com/zhimbura/lca-multiple-algorithm
- Owner: zhimbura
- Created: 2021-05-23T13:32:10.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-01-10T11:42:46.000Z (about 2 years ago)
- Last Synced: 2024-01-29T22:48:47.529Z (about 2 years ago)
- Topics: example, lca
- Language: Vue
- Homepage:
- Size: 954 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LCA алгоритм для больше чем 2 node за один проход

На изображении красным отмечены выбранные Node, а синим их общий родитель.
Алгоритм поиска [getLowestCommonAncestor()](https://github.com/Tihon-Ustinov/lca-multiple-algorithm/blob/main/src/libs/Node.js#L26).
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Lints and fixes files
```
npm run lint
```
### Try online
See [lca-multiple-algorithm](https://zhimbura.github.io/lca-multiple-algorithm/).