JSPM

bfs2inorder

0.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q28960F
  • License BSD

Converts BFS tree indexes to inorder tree indexes

Package Exports

  • bfs2inorder

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (bfs2inorder) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

bfs2inorder

Converts an index in bfs order to an inorder index.

Install

npm install bfs2inorder

Use

var bfs2inorder = require("bfs2inorder")

console.log(bfs2inorder(10, 3))

require("bfs2inorder")(n, x)

Returns the index of a node at position x in a bfs tree in an inorder traversal of the tree.

Credits

(c) 2013 Mikola Lysenko. MIT License