
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 6710 Articles for Javascript

229 Views
In this program, we are given two linked lists and we have to create a new linked list that will contain all the elements which are common in both of the lists as the lists are given sorted then we can use the concept of two pointers which are going to see in the article below. Introduction to Problem In the given problem we have to find the intersection of the given linked lists. Intersection means to get the common values from the given set of values, so here we have given two sorted linked lists from which we have ... Read More

172 Views
In this article, we are going to implement a JavaScript program for finding a triplet from three linked lists with a sum equal to a given number. This problem is a kind of variation of the standard and famous three-sum problem but in a linked list manner. Let’s see the problem and implement its code along the key points of the problem. Introduction to Problem This problem is the variation of the standard problem of three sums where we are given three arrays and we have to find if there is any triplet present in the array with a sum ... Read More

414 Views
Counting sets of 1s and 0s in a binary matrix can be achieved using nested for loop with conditional statement. A binary matrix is a matrix that consists of only two digits as its name suggests and those two digits are 1 and 0. In this article, we are having a 2D binary matrix having 0 and 1 only. Our task is to write a JavaScript program for counting the sets of 1s and 0s in a given binary matrix. Formula: Let us a consider a set as {a, b} having 2 elements i.e, n = 2. Total number ... Read More

1K+ Views
Counting frequencies of array elements means we have to count the number of times an element from the array appears in the given array. We will be discussing five different approaches to achieve this. We can use some inbuilt data structures or external libraries for easy implementation. In this article we are having an array with duplicate elements, our task is to count frequencies of array elements in JavaScript. Users must be familiar with array and it's functions, JavaScript methods and function, loops, conditional statement and Javascript objects. Approaches to Count Array Elements Frequencies Here is a list of ... Read More

4K+ Views
Prime numbers are numbers that have exactly two perfect divisors. We will see two methods to find the number of prime numbers in a given range. The first is using the brute force method and by this method time complexity is a bit high. Then we will improve this method and will go for the Sieve of the Eratosthenes algorithm to go with better time complexity. In this article, we are going to find the total number of prime numbers in the given range using the JavaScript programming language. Brute Force Method In this method first, we will learn how ... Read More

161 Views
In this article, we will go through a JavaScript program to check whether all the rotations of a given number are greater than or equal to the given number or not. We will write an algorithm and explain every step that what we are doing. The time complexity of the code that is going to discuss will be optimistic and space complexity will all be improved from one code to another. Introduction to Problem In the problem, we are given a number and we have to check for each rotation whether they all are greater than the current number or ... Read More

417 Views
The basic structure of a Linked List in JavaScript can be created using the class in JavaScript and then the movement of the nodes from one position to another can be done for rotation. In this article, we will learn how to rotate a linked list in a clockwise manner in JavaScript programming language. We will see the code for understating the concepts in deep. In the given problem we have given a linked list and we have to rotate it in a clockwise manner. This means, we have to put the last element in first place in every move ... Read More

374 Views
Memoization is a helper function, or we can say a technique for improving the efficiency of a program by Keeping track of the values that the function has already calculated in the past. In this article, we will discuss the Memoization Helper function with different examples and discuss all the examples in detail so that we can get a better understanding of Memoization. Now let’s discuss the Memoization helper function in the deep in the below section and also see their implementation with an explanation. Introduction to Memoization Helper Function Memoization is a technique of programming that is used to ... Read More

213 Views
As we know JavaScript is a lightweight programming language in which generators were introduced in ECMAScript 2015. A generator is a process that has many output values and may be stopped and started. In JavaScript, a generator is made up of a generator function that produces an iterable Generator object. In this article, we are going to discuss the generators in JavaScript and also the different types of generators in JavaScript with syntax and examples in detail. Introduction to Generators in JavaScript The generator's function is as same as the regular function but there is a bit of difference in ... Read More

945 Views
There are two jQuery plugins that can we use to style the select boxes that are Select2 and Chosen. Both the plugins Select2 and Chosen are improving the look of the selected boxes and enhancing the behavior of the boxes which leads to the make them user-friendly. Also, both of these plugins can be used for multiple selected boxes as well as single selected boxes. Chosen JavaScript plugin that creates the select boxes user-friendly that is chosen. Chosen is available in both the prototype and JQuery versions. Features of the Chosen User-friendly Your users won't have to slog through a ... Read More