Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
NotificationsYou must be signed in to change notification settings

RahulRanjan7201/typescript-collections-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Project uses Generics.Included Data StructureQueue and others ds are coming soon ...This includes many function to manipulate arraynpm i typescript-collections-api --saveconst {Queue} = require('typescript-collections-api');

eg:const {Queue} = require('typescript-collections-api');let queue = new Queue();queue.enqueue(4)queue.enqueue('B')console.log(queue._store);// To know the elements in queueconsole.log(queue._store.length)// To know the length of the queueconsole.log(queue.dequeue()); // To Removing the first element

About Queue Data StructureA Queue is is FIFO DS with a time omplexity of O(1) for key operations. We can easily model this in TypeScript using a generic class for items of type T.

Operation

  1. enqueue
  2. dequeue
  3. isEmpty
  4. getLength
  5. peek

We are introducing new DS Stack.Stack is DS which two key operation

  1. Push of an element in store
  2. Pop the element

Operations1.isEmpty()2.getLength()3.push(value)4.pop()

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2026 Movatter.jp