New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

container-avltreelist

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

container-avltreelist - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

2

package.json
{
"name": "container-avltreelist",
"version": "0.1.0",
"version": "0.1.1",
"description": "AvlTreeList implementation in JavaScript",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -7,4 +7,4 @@ # container-avltreelist

To manage a pool of sorted elements. **Complexity in O(log2(n)) for addition and removal**.
Plus, complexity in O(1) in the best case for repositioning an element when updating its sorting property.
This container is best used for managing a list of element sorted where the values of the properties on which the ordering depends change slowly over time.
Plus, ***complexity in O(1)*** in the best case ***for repositioning an element*** after updating its sorting property.
This container is best used for managing a list of element sorted when the values of the ordering properties change slowly over time.

@@ -70,5 +70,6 @@ To **instantiate** a new tree:

myObject.zIndex = 10; // sorting property (here zIndex) of element changed
myTree.reposition(myObject);
myTree.reposition(myObject); // repositioning object with respect to new sorting property value
```
Note 1: ```reposition``` method is in O(1) in the best case, and O(n) in worst case, depending on how much the value of sorting property changed
Note 2: It is important to attach the object reference on the ```_avlTreeListReference``` property of the object
***Note 1***: ```reposition``` method is in O(1) in the best case, and O(n) in worst case, depending on how much the value of sorting property changed.
***Note 2***: It is important to attach the object reference on the ```_avlTreeListReference``` property of the object.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc