Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

flex-algo

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flex-algo - npm Package Compare versions

Comparing version 0.1.10 to 0.1.11

2

lib/bst.d.ts

@@ -22,3 +22,5 @@ declare class BinaryNode {

leftSideView(): number[];
_isValid(node: BSTNode, min: number, max: number): boolean;
isValid(): boolean;
}
export {};

@@ -141,4 +141,21 @@ "use strict";

};
BST.prototype._isValid = function (node, min, max) {
if (node === null)
return true;
if ((node === null || node === void 0 ? void 0 : node.value) <= min || (node === null || node === void 0 ? void 0 : node.value) >= max) {
return false;
}
if (!this._isValid(node.left, min, node.value)) {
return false;
}
if (!this._isValid(node.right, node.value, max)) {
return false;
}
return true;
};
BST.prototype.isValid = function () {
return this._isValid(this.root, -Infinity, Infinity);
};
return BST;
}());
exports.BST = BST;

2

package.json
{
"name": "flex-algo",
"version": "0.1.10",
"version": "0.1.11",
"description": "\"SDK for commonly used data structure and algorithms\"",

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

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