An infix to Postfix converter is a tool that converts an infix expression to a postfix expression. In this tutorial, we will build the infix to postfix converter using JavaScript. What is an infix expression? Infix expression is an expression in which the operators are between the operands. For example, the expression "3 + 4" is an infix expression. What is a postfix expression? A postfix expression is an expression in which the operators are after the operands. For example, the expression "3 4 +" is a postfix expression. How does the Infix to Postfix converter work? The converter first ... Read More
In this tutorial, we'll be implementing a queue using only two stacks. This is a pretty common interview question so it's good to know how to do it. Algorithm STEP 1 − We have two stacks, one for enqueueing and one for dequeueing. STEP 2 − We enqueue by pushing onto the enqueue stack. STEP 3 − We dequeue by popping from the dequeue stack. STEP 4 − If the dequeue stack is empty, we pop everything from the enqueue stack and push it onto the dequeue stack. STEP 5 − This reverses the order so that ... Read More
JavaScript has a built-in function called replace() that can be used to replace characters in a string. This function takes two arguments: the first argument is the character or characters to be replaced, and the second argument is the character or characters to replace them with. Syntax Following is the syntax to replace characters except last with a specified mask − str.replace(/.(?=.)/g, "x"); The first argument to the replace() method is character/s to be replaced. We pass a regular expression for all characters except last as the first argument to the replace method. All characters except the last are ... Read More
Information Technology used traditional centralized computing framework for many years, where one server was connected to multiple clients and was responsible to fulfill the requests coming from them. This client-server architecture has its own limitations such as possibility of scaling to some extent only vertically, ability of the server to process only certain number of requests when all clients send requests at a time, and threat to functionality if the server fails. The shortfalls were overcome by Distributed computing and then further with Edge computing frameworks. This article briefly elaborates on each of the computing frameworks and the differences between ... Read More
With a little bit of JavaScript and DOM manipulation, you can create all sorts of interesting patterns on a webpage. In this tutorial, we'll show you how to create a chessboard pattern using JavaScript and the DOM.ApproachSTEP 1 − We start by creating a element with an id of "chessboard". This will be the element that contains our chessboard pattern.STEP 2 − We create a element that sets the width and height of the #chessboard div to 400px. We also create a class called .chess-square that sets the width and height of elements to 50px and floated to ... Read More
While traditional marketing still holds its place by billboards, distributing handouts, promoting on television and newspaper, etc., the digital marketing has opened-up new gates to market the products and services quicker, reaching out to vast customer base, and providing measurable insights of the marketing campaign. What is Digital Marketing? It is tactics used in promotion of brands by reaching out to customers via Internet and using various digital communication channels such as email, social media, web-based advertising, text messages, and multimedia messages. Examples of Digital Marketing Here are some forms of Digital Marketing − Search Engine Optimization (SEO) − ... Read More
Computer systems have been handling data since decades, but the volume and speed of handling has become phenomenal in the last few years. Data processing means "the collection and manipulation of items of data to produce meaningful information", has been evolving in terms of speed, efficiency, and leveraging the computing resources, till date. In this article, we will see two important techniques of data processing in the field of computation − Batch processing and Stream processing. We will elaborate them in detail and see how they are different. What is Batch Processing? Batch processing is technique of processing large amount ... Read More
Data transmission has been crucial in the age of digital communication. Either digital or analogue data can be transmitted over a communication medium to one or more devices, depending on the interfaces in use. There are two important types of data transmission − Baseband and Broadband. Read through this article to understand each type of transmission and the differences between them. What is Baseband Transmission? It is a transmission technology where a single signal is either sent or received through a communication channel such as a cable, in the form of discrete pulses of the single frequency. The frequency of ... Read More
In electrical machines and instruments, an excitation system is the one which receives electrical energy to produce the working magnetic flux. The excitation system is the crucial component every electromechanical energy conversion device such as electric motor. Depending upon the number of input supplies, any electromechanical energy conversion system can be grouped into the following two categories − Singly Excited System Doubly Excited System In this article, we will discuss the major differences between singly excited system and doubly excited system. Let's start with a basic overview of what singly and doubly excited systems are. What is a ... Read More
Both turbocharger and supercharger are used to increase the pressure of atmospheric air before sending it to the engine cylinder. The compressed air increases the amount of fuel to enter into the engine cylinder for combustion, which in turn increases the power of the engine.Basically both turbocharger and supercharger perform the same operation. However, they are different from each other in many ways, which we are going to highlight in this article. What is a Turbocharger? A forced induction system which uses energy of exhaust gases to compress the atmospheric air and sends it to the engine cylinder is known ... Read More