Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles on Trending Technologies
Technical articles with clear explanations and examples
JavaScript Program for Rotate a Matrix by 180 degrees
To rotate a matrix by 180 degrees, we can achieve this using various approaches. In this article, we'll explore three different methods with step-by-step explanations and complete examples. A 180-degree rotation of a matrix means that the first row becomes the last row in reverse order, the second row becomes the second-to-last row in reverse order, and so on. Essentially, we're flipping the matrix both horizontally and vertically. Example Input: matrix = [[1, 2, 3, 4], [5, 6, 7, 8], ...
Read MoreJavaScript Program to check if the matrix is lower Triangular
A matrix can be defined as a 2D array that stores elements in it and mathematically it stores the numbers in it. A Lower triangular matrix is a squared matrix that has the same number of rows and columns and all the elements that are present above the main diagonal passing from the first cell (present at the top-left) towards the last cell (present at the bottom-right) are zero. We will implement a proper code with explanation and discussion over time and space complexity. What is a Lower Triangular Matrix? A lower triangular matrix is a square matrix ...
Read MoreJavaScript Program for the Third Largest Element in an Array of Distinct Elements
For the third largest element in an array of distinct elements, we will discuss three different approaches. We will improve efficiency with each approach and discuss their complexities. In this article we are having an array of distinct elements, our task is to find third largest element in an array of distinct elements in Javascript. Users must be familiar with array, loops and conditional statement. Problem Statement Given an array of distinct elements, we need to find the third largest element efficiently. Input: arr = [2, 5, 8, 1, 4, 10, 7] => Highest: 10, ...
Read MoreHow to Create a Time Picker in ReactJS ?
ReactJS is a popular JavaScript library for building user interfaces. It provides developers with a flexible and efficient way to create interactive web applications. Time pickers are commonly used in applications where users need to select a specific time slot for booking appointments, scheduling events, or reserving resources. A time picker allows users to easily select the desired time and ensures accurate time allocation. In this article, we will create a time picker in steps using ReactJS. Setting Up the React App First, let's set up a ...
Read MoreAccessing metadata from an audio files using JavaScript
Audio files contain embedded metadata such as title, artist, album, genre, and year. This metadata is valuable for media players, music libraries, and cataloging applications. JavaScript provides several approaches to access this information, ranging from basic HTML5 audio properties to dedicated libraries for extracting ID3 tags. Approaches to Access Audio Metadata Using the HTML5 Audio Element Using Web Audio API Using ID3 Libraries (jsmediatags) Using the HTML5 Audio Element The HTML5 audio element provides basic metadata access like duration and playback information. However, it ...
Read MoreJavaScript Program to Check whether all the rotations of a given number are greater than or equal to the given number or not
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 ...
Read MoreJavaScript Program to Check if Matrix is Upper Triangular
To check if matrix is upper triangular matrix, we check if all the elements below the main diagonal is 0. We are going to discuss two different approaches and compare their complexities. In this article we are having a 2D square matrix, our task is to write a JavaScript program to check if matrix is upper triangular matrix. Users must be familiar with upper triangular matrix, nested for loop, conditional statement and javascript methods. ...
Read MoreJavaScript Program for Two Pointers Technique
In this article we are given a sorted array, our task is to find if there exists any pair of elements such that their sum is equal to a given number. Users must be familiar with array, loop and nested loops, and if/else statement. Two Pointers Technique Two pointers technique is a commonly used algorithmic approach to solve various problems that require linear time complexity. This technique is used to find a solution for problems that involve searching, sorting, or manipulating arrays, strings, or linked lists. In this article, we are going to solve the pair sum problem using ...
Read MoreHow to create Tabs in ReactJS ?
ReactJS is a popular JavaScript library for building user interfaces. It provides a component-based approach to web development, making it easier to create interactive and dynamic UI elements. Tabs are a common UI pattern used to organize and present content in a user-friendly manner. In this article, we will explore how to create a tab component in ReactJS. Prerequisites Before reading this article, you should have a basic understanding of ReactJS and its core concepts. Make sure you have Node.js and npm (Node Package Manager) installed on your machine. Setting up a new React project First, ...
Read MoreHow to check if the date is less than 1 hour ago using JavaScript?
In this tutorial, we will learn to find the difference between two dates and check if the difference is less than one hour. Sometimes, developers must play with the Date object and perform some operation every hour. So, this can be one approach that checks if a particular operation is performed before an hour, perform it again; otherwise, wait to complete the hour. Here, we will learn different approaches to check if the date is less than 1 hour ago using JavaScript. Use the getTime() method The getTime() method returns the total milliseconds for the date from ...
Read More