npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ts-data-structure

v1.0.0

Published

Algorithms and data structures implemented in TypeScript

Downloads

1

Readme

TypeScript Algorithms and Data Structures

This repository contains TypeScript based examples of many popular algorithms and data structures.

What is Data Structure ?

In computer terms, a data structure is a Specific way to store and organize data in a computer's memory so that these data can be used efficiently later. Data may be arranged in many different ways such as the logical or mathematical model for a particular organization of data is termed as a data structure. The variety of a specific data model depends on the two factors it must be loaded enough in structure to reflect the actual relationships of the data with the real world object , the formation should be simple enough so that anyone can efficiently process the data each time it is necessary.

As we have discussed above, anything that can store data can be called as a data structure, hence Integer, Float, Boolean, Char etc, all are data structures. They are known as Primitive Data Structures. Then we also have some complex Data Structures, which are used to store large and connected data. Some example of Abstract Data Structure are :Linked List , Tree , Graph , Stack, Queue etc. All these data structures allow us to perform different operations on data. We select these data structures based on which type of operation is required .

What is Algorithm ?

An algorithm is a detailed series of instructions for carrying out an operation or solving a problem. In a non-technical approach, we use algorithms in everyday tasks, such as a recipe to bake a cake or a do-it-yourself handbook. Technically, computers use algorithms to list the detailed instructions for carrying out an operation. For example, to compute an employee’s paycheck, the computer uses an algorithm. To accomplish this task, appropriate data must be entered into the system. In terms of efficiency, various algorithms are able to accomplish operations or problem solving easily and quickly. Every Algorithm must satisfy the following properties:Input , Output , Definiteness , Finiteness , Correctness

What is Big O ?

Big O notation is used to communicate how fast an algorithm is. This can be important when evaluating other people’s algorithms, and when evaluating your own! In this article, I’ll explain what Big O notation is and give you a list of the most common running times for algorithms using it.

Implementation in TypeScript

Typescript is a superset of Javascript, which is designed to develop large Javascript applications. Being a superset of Javascript, existing Javascript programs are also valid Typescript programs, meaning you don’t have to worry about converting the whole existing Javascript code into Typescript at once. Instead if you wish to migrate your existing Javascript code to Typescript, you can do that gradually. There are some major benefits of using Typescript, which includes, support for Classes and Modules, Type-checking, ES6 features support, Class library API definition, support for Javascript packaging, and a lot more. The idea behind implementing data structure in TypeScript  helping developers to learn and practice algorithms and do it in JavaScript.All code is 100% covered with tests. This is done not only to keep code working correctly but also to give you an illustration of how each algorithms or data structure works Currently there are following data structures a covered: Linked List , Queue , Stack , Hash Table , Heap , Tree

License

MIT license.