Data structures in TypeScript
TypeScript JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test Add bst, graph, queue Mar 28, 2016
typings Array and stack structures Mar 27, 2016
.gitignore Array and stack structures Mar 27, 2016
README.md Clean up Mar 28, 2016
array.ts Add bst, graph, queue Mar 28, 2016
bst.ts Clean up Mar 28, 2016
graph.ts Clean up Mar 28, 2016
package.json Clean up Mar 28, 2016
queue.ts Clean up Mar 28, 2016
stack.ts Add bst, graph, queue Mar 28, 2016
tsconfig.json Array and stack structures Mar 27, 2016
typings.json Array and stack structures Mar 27, 2016

README.md

Data Structures in TypeScript

This collection is a side effect of my picking up some TypeScript over the weekend.

  • Array
  • Stack
  • Queue
  • Binary Search Tree
  • Graph

I'm still wary of using JavaScript classes, and my intuition tells me that using TypeScript reinforces that style of thinking in classical inheritance. So I opted instead to write the structures in the classical JavaScript prototypical style.

I also included Lodash in the project just to learn how to import external libraries for use in TypeScript environments.

Tests are also included (except for graphs, because the weekend is over). Not all batteries are included though - you have to have TypeScript installed globally: npm install typescript -g. Then npm install and run npm test.