![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
js-datastructures-ko
Advanced tools
npm install js-datastructures-ko
yarn add js-datastructures-ko
후입선출(LIFO:Last In, First Out)
방식인 자료 구조이다.Last in, First Out (FIFO)
method. const { Stack } = requires('js-datastructures-ko');
const stack = new Stack();
stack.push(1);
stack.push(2);
stack.push(3);
stack.push(4);
console.log(stack.pop()); // 4
console.log(stack); // Stack { arr: [ 1, 2, 3 ], length: 3 }
console.log(stack.top()); // 3
console.log(stack.bottom()); // 1
stack.print() // 1 2 3
선입선출(FIFO:First In, First Out)
방식인 자료 구조이다.First in, First Out (FIFO)
method. const { Queue } = require("js-datastructures-ko");
const queue = new Queue();
queue.enqueue(1);
queue.enqueue(2);
queue.enqueue(3);
queue.enqueue(4);
console.log(queue.dequeue()); // 1
console.log(queue); // Queue { arr: [ 2, 3, 4 ], length: 3 }
console.log(queue.top()); // 4
console.log(queue.bottom()); // 2
queue.print() // 2 3 4
노드들이 연결되어 있는 방식
으로 데이터를 저장하는 자료구조이다. const { LinkedList } = require("js-datastructures-ko");
const linkedList = new LinkedList();
linkedList.prepend(1);
linkedList.append(2);
linkedList.append(4);
linkedList.insertAt(3, 2);
/*
LinkedList {
length: 4,
head: Node { data: 1, next: Node { data: 2, next: [Node] } }
}
*/
console.log(linkedList);
console.log(linkedList.search(2)); // 3
linkedList.removeAt(0);
linkedList.print(); // 2 3 4
key-value
형태로 데이터를 묶어 entry로 저장하는 형태이다. const { HashMap } = require("js-datastructures-ko");
const hashMap = new HashMap();
hashMap.put("hi", 1);
hashMap.put("bye", 2);
hashMap.put(1, 3);
hashMap.remove("hi");
console.log(hashMap); // HashMap { map: { '1': 3, bye: 2 } }
console.log(hashMap.get(1)); // 3
console.log(hashMap.containsKey("hi")); // false
console.log(hashMap.containsValue(2)); // true
console.log(hashMap.keys()); // [ '1', 'bye' ]
console.log(hashMap.values()); // [ 3, 2 ]
const clone = hashMap.clone();
clone.put("hahaha", "hahaha");
console.log(hashMap); // HashMap { map: { '1': 3, bye: 2 } }
console.log(clone); // HashMap { map: { '1': 3, bye: 2, hahaha: 'hahaha' } }
hashMap.clear();
console.log(hashMap.isEmpty()); // true
FAQs
js-datastructures-ko
The npm package js-datastructures-ko receives a total of 0 weekly downloads. As such, js-datastructures-ko popularity was classified as not popular.
We found that js-datastructures-ko demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.