Tag: Javascript
Reverse a Linked List in groups of given size using Javascript
In this post given a linked list, write a function to Reverse a Linked List in groups of given size using Javascript after every k nodes (where k is an […]
Rotate a Linked List in Javascript
In this post we are going to Rotate a Linked List in Javascript . For example, if the given linked list is 10->20->30->40->50->60 and k is 4, the list should […]
Understanding Closures In Javascript
Hi Coders, Today we are going to understand the most important and popular topic of javascript – Understanding Closures In Javascript The Callbacks, event handlers can access outer scope variable […]
Binary Tree Traversals (Inorder, Preorder and Postorder) in Javascript
In previous post we have learned about how can we create a binary search tree in javascript and tried some operations on binary tree like search a node in tree, […]
Binary Search Tree in Javascript
Binary Search Tree is node based data structure which has the below properties Left Nodes of tree is lesser than its parent node. Right Nodes of tree are greater than […]
Node JS Events module and EventEmitter
Hi Coders, Today we are going to discuss about node.js events module and everything you need to know about event emitters in node.js What is a Event ? When a […]
Edit Distance program in Javascript
We have 2 strings and we can perform below operations on st1 to make it same as str2. Insert Remove Replace Input: str1 = “cat”, str2 = “cut”Output: 1We can […]
Program for Stock Buy Sell to Maximize Profit in Javascript
The cost of a stock on each day is given in an array, find the max profit that you can make by buying and selling in those days. For example, […]
Rearrange an array in maximum minimum form in Javascript
In a sorted array of integers, rearrange the array alternately. First element should be the maximum value, second minimum value, third-second max, fourth-second min and so on. Examples Input: arr[] […]
Understanding Prototypes in Javascript
Hey, Today in this post we are going to discuss what are prototypes in javascript, and how they work. Before moving on lets first discuss why prototypes are required in […]