Saurabh Anand has Published 24 Articles

JavaScript Program for Find the smallest missing number

Saurabh Anand

Saurabh Anand

Updated on 10-Apr-2023 13:56:51

228 Views

We are given a sorted array of distinct non-negative integers, here we have to find the smallest missing number. Hence in this tutorial, we will explore different methods to solve this problem and discuss their time complexities with various examples. Understanding the Problem The problem statement is quite simple. Given ... Read More

JavaScript program to find the lost element from a duplicated array

Saurabh Anand

Saurabh Anand

Updated on 10-Apr-2023 13:55:14

582 Views

We have problem to write a program in JavaScript that can identify the missing element in a duplicated array. The input for the program will be an array that contains duplicate elements except for one, which is missing. The program should be able to identify the missing element and return ... Read More

JavaScript Program for Find k pairs with smallest sums in two arrays

Saurabh Anand

Saurabh Anand

Updated on 10-Apr-2023 13:52:36

176 Views

In this article, we will first find all the pairs that can be made with two arrays. Then, according to the value of k, we will display the pairs with the smallest sums in two arrays. Here, we will first use the brute-force method to solve the problem, then ... Read More

JavaScript Program for Equilibrium index of an array

Saurabh Anand

Saurabh Anand

Updated on 10-Apr-2023 13:47:28

286 Views

The position where the sum of the elements to its left and right equals one another is known as the equilibrium index of an array. To put it another way, if we take a look at an array of size n, the equilibrium index i is a point such that ... Read More

JavaScript Program for Diagonally Dominant Matrix

Saurabh Anand

Saurabh Anand

Updated on 10-Apr-2023 13:40:44

96 Views

Matrix or matrices are great tools in computer science and mathematics for quickly approximating difficult calculations. A matrix is a collection of numbers organized in rows and columns that can represent data or mathematical problems. By this article, we will learn about the Diagonally Dominant matrix. We will look ... Read More

How to create a function `generateSelector` to generate CSS selector path of a DOM element ?

Saurabh Anand

Saurabh Anand

Updated on 21-Feb-2023 17:38:14

236 Views

The generateSelector method is a helpful tool for determining the path to a specific portion of a website known as a DOM element. Understanding how CSS selectors work and how to build them can be useful in a variety of situations, such as testing automation or the construction of shortcuts ... Read More

How to create a button that submits a form and downloads a pdf simultaneously?

Saurabh Anand

Saurabh Anand

Updated on 21-Feb-2023 17:33:07

3K+ Views

By using HTML, JavaScript and jsPDF, we can create a button that can submit the form and download a pdf simultaneously. We will use HTML to create a form, JavaScript to handle the submission process and jsPDF to generate the PDF document. The act of submitting a form and getting ... Read More

How to Create a Bootstrap Spinner and Display on Screen till the data from the API loads ?

Saurabh Anand

Saurabh Anand

Updated on 21-Feb-2023 17:31:43

5K+ Views

Using Bootstrap, we will create a Bootstrap spinner and display it on the screen until data from an API is loaded. This will give customers visual indications that something is going on in the background and can be an excellent method to improve the user experience. In this blog, we ... Read More

How to Create a Binary Calculator using HTML, CSS and JavaScript?

Saurabh Anand

Saurabh Anand

Updated on 21-Feb-2023 17:29:03

725 Views

A binary calculator is a program that performs mathematical calculation on binary numbers. Now, as of you remember the binary numbers are those numbers which are formed from only two numbers i.e., 0 and 1. In this blog, we will use this program to calculate addition, subtraction, multiplication and division ... Read More

How to create 3D Geometries in webGL and p5.js?

Saurabh Anand

Saurabh Anand

Updated on 21-Feb-2023 17:27:50

574 Views

Creating 3D geometries in webGL and p5.js is a powerful way to create interactive and visually interesting web applications. With the ability to create basic shapes, add textures, lighting, and materials, and transform 3D geometries, we can create a wide range of 3D graphics and animations. By understanding the basics ... Read More

Advertisements