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.44 to 0.1.45

1

lib/array.d.ts
export declare function twoSum(nums: number[], target: number): number[];
export declare function maxArea(heights: number[]): number;
export declare function moveZeroes(nums: number[]): void;
export declare function findDuplicate(nums: number[]): number;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.moveZeroes = exports.maxArea = exports.twoSum = void 0;
exports.findDuplicate = exports.moveZeroes = exports.maxArea = exports.twoSum = void 0;
function twoSum(nums, target) {

@@ -49,1 +49,14 @@ var map = {};

exports.moveZeroes = moveZeroes;
function findDuplicate(nums) {
var map = {};
for (var i = 0; i < nums.length; i++) {
if (map[nums[i]] !== undefined) {
return nums[i];
}
else {
map[nums[i]] = i;
}
}
return -1;
}
exports.findDuplicate = findDuplicate;

4

lib/index.d.ts

@@ -10,3 +10,3 @@ import { PriorityQueue } from './priorityQueue';

import { lengthOfLongestSubstring, lengthOfLongestSubstringTwoDistinct, backspaceCompare, isPalindrome, strip, isSubPalindrome, hash, groupAnagrams, multiply } from './string';
import { twoSum, maxArea, moveZeroes } from './array';
import { twoSum, maxArea, moveZeroes, findDuplicate } from './array';
import { isValidParentheses, minRemoveToMakeValid } from './stack';

@@ -17,2 +17,2 @@ import { StackQueue } from './stackQueue';

import { longestPalindrome, maxSubArray } from './dynamicProgramming';
export { PriorityQueue, BinaryTree, BinaryNode, BST, quickSort, pivot, quickSelect, quickSelectPivot, binarySearch, binarySearchRange, searchRange, Graph, Dijkstra, Matrix, lengthOfLongestSubstring, lengthOfLongestSubstringTwoDistinct, backspaceCompare, isPalindrome, strip, isSubPalindrome, longestPalindrome, hash, groupAnagrams, multiply, maxSubArray, twoSum, maxArea, moveZeroes, isValidParentheses, minRemoveToMakeValid, StackQueue, ValueType, LinkedList, };
export { PriorityQueue, BinaryTree, BinaryNode, BST, quickSort, pivot, quickSelect, quickSelectPivot, binarySearch, binarySearchRange, searchRange, Graph, Dijkstra, Matrix, lengthOfLongestSubstring, lengthOfLongestSubstringTwoDistinct, backspaceCompare, isPalindrome, strip, isSubPalindrome, longestPalindrome, hash, groupAnagrams, multiply, maxSubArray, twoSum, maxArea, moveZeroes, findDuplicate, isValidParentheses, minRemoveToMakeValid, StackQueue, ValueType, LinkedList, };
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LinkedList = exports.StackQueue = exports.minRemoveToMakeValid = exports.isValidParentheses = exports.moveZeroes = exports.maxArea = exports.twoSum = exports.maxSubArray = exports.multiply = exports.groupAnagrams = exports.hash = exports.longestPalindrome = exports.isSubPalindrome = exports.strip = exports.isPalindrome = exports.backspaceCompare = exports.lengthOfLongestSubstringTwoDistinct = exports.lengthOfLongestSubstring = exports.Matrix = exports.Dijkstra = exports.Graph = exports.searchRange = exports.binarySearchRange = exports.binarySearch = exports.quickSelectPivot = exports.quickSelect = exports.pivot = exports.quickSort = exports.BST = exports.BinaryNode = exports.BinaryTree = exports.PriorityQueue = void 0;
exports.LinkedList = exports.StackQueue = exports.minRemoveToMakeValid = exports.isValidParentheses = exports.findDuplicate = exports.moveZeroes = exports.maxArea = exports.twoSum = exports.maxSubArray = exports.multiply = exports.groupAnagrams = exports.hash = exports.longestPalindrome = exports.isSubPalindrome = exports.strip = exports.isPalindrome = exports.backspaceCompare = exports.lengthOfLongestSubstringTwoDistinct = exports.lengthOfLongestSubstring = exports.Matrix = exports.Dijkstra = exports.Graph = exports.searchRange = exports.binarySearchRange = exports.binarySearch = exports.quickSelectPivot = exports.quickSelect = exports.pivot = exports.quickSort = exports.BST = exports.BinaryNode = exports.BinaryTree = exports.PriorityQueue = void 0;
var priorityQueue_1 = require("./priorityQueue");

@@ -40,2 +40,3 @@ Object.defineProperty(exports, "PriorityQueue", { enumerable: true, get: function () { return priorityQueue_1.PriorityQueue; } });

Object.defineProperty(exports, "moveZeroes", { enumerable: true, get: function () { return array_1.moveZeroes; } });
Object.defineProperty(exports, "findDuplicate", { enumerable: true, get: function () { return array_1.findDuplicate; } });
var stack_1 = require("./stack");

@@ -42,0 +43,0 @@ Object.defineProperty(exports, "isValidParentheses", { enumerable: true, get: function () { return stack_1.isValidParentheses; } });

{
"name": "flex-algo",
"version": "0.1.44",
"version": "0.1.45",
"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