Aditya Rawatcustom-priority-event-emitter.hashnode.devยทDec 18, 2024How to Create a Custom Priority Event Emitter in Node.jsSetup : Libraries Installation and Setup npm i -d @types/node tsx typescript npx tsc --init Change tsconfig.json and package.json // tsconfig.json { "compilerOptions": { "target": "es2016", "module": "ES6", "moduleResolution": "nodenex...Node.js
Alexander Koloboviamaleko.hashnode.devยทSep 29, 2024Algorithms in Everyday TasksOriginally published on TechBullion. I often hear from front-end developers, that the ability to solve algorithmic problems, which are frequently assessed in interviews, is completely unnecessary for regular developers. They believe the same applies ...55 readstypedarray
Chetan Dattachetan77.hashnode.devยทSep 18, 2024Heap ImplementationBrief What is heap? A heap is a complete binary tree that follows the heap order property. What is Complete Binary Tree (CBT)? A complete binary tree is a binary tree in which every level is completely filled except for the last level. Nodes are ...Leetcodeheapify
Chetan Dattachetan77.hashnode.devยทSep 11, 2024Task SchedulerProblem You are given an array of CPU tasks, each represented by letters A to Z, and a cooling time, n. Each cycle or interval allows the completion of one task. Tasks can be completed in any order, but there's a constraint: identical tasks must be s...Leetcodepriority queue
Chetan Dattachetan77.hashnode.devยทSep 7, 2024Kth Largest Element in an ArrayProblem Given an integer array nums and an integer k, return the k<sup>th</sup> largest element in the array. Note that it is the k<sup>th</sup> largest element in the sorted order, not the kth distinct element. Can you solve it without sorting? (lin...Leetcodekth-largest-element-in-an-array
Akshaya Biswalakshaya-biswal.hashnode.devยทAug 17, 2024Priority QueueA Priority Queue is a type of data structure where each element is associated with a priority, and elements are served based on their priority rather than just their position in the queue. Higher priority elements are dequeued before lower priority e...DSA
JNAYEH Sirinesirinejnayeh.hashnode.devยทAug 1, 2024Understanding Huffman Coding: A Practical ApproachHuffman coding stands as a cornerstone in data compression techniques, offering a powerful method to reduce the size of digital information. This algorithm, which relies on the frequency of characters in a dataset, has a significant impact on the eff...2 likesยท35 readsBinaryTrees
Animesh Kumaranimeshk.hashnode.devยทJun 28, 2024Understanding JavaScript - Microqueue vs MacroqueueJavaScript is a powerful and dynamic programming language widely used for web development. It helps bring web pages to life with interactive features. One of the important aspects of JavaScript is understanding how it handles asynchronous tasks. Two ...1 likeJavaScript
Chetan Dattachetan77.hashnode.devยทJun 9, 202419 Java - Priority Queue, Compartor vs ComparblePriority Queue Queue is an interface, child of Collection interface. Generally Queue follows FIFO approach, but there are exceptions like PriorityQueue Supports all the methods available in Collection + some other methods mentioned below Method...87 readsJavapriority queue
Gulshan Kumarperfinsights.hashnode.devยทMay 11, 2024Relative RanksYou are given an integer array score of size n, where score[i] is the score of the i<sup>th</sup> athlete in a competition. All the scores are guaranteed to be unique. The athletes are placed based on their scores, where the 1<sup>st</sup> place athl...Java SolutionJava