Minimum Adjacent Swaps Required to Sort Binary Array

Vaishnavi Tripathi
Updated on 11-Apr-2023 16:06:50

919 Views

There are different approaches, we can use to minimize the number of swaps required on adjacent elements to get a sorted array. The given array as the output only contains two types of elements i.e., 0 and 1. We will discuss two different approaches to solve the problem in which the first solution uses extra space to store the number of zeroes, while the second one uses only constant space. Problem Statement We are given an array which contains only two types of elements 0 & 1. Our aim is to find out how many minimum swaps on adjacent elements ... Read More

Create a Rainbow Using HTML5

Aman Gupta
Updated on 11-Apr-2023 16:06:09

2K+ Views

Overview The task is to create a beautiful rainbow using the HTML5 version. The rainbow consists of the seven colors, these seven colors are Violet, Indigo, Blue, Green, Yellow, Orange and Red. These colors are arranged in the bottom-up approach. So to achieve this task we will use the Scalable Vector Graphics tag which helps us to create the graphics shape inside a HTML page. Inside the svg element we have several elements by which we can draw the shape. These tags are: rect, circle, ellipse, line, polyline, polygon and path. Syntax The syntax used to create the ... Read More

Create Radio Button Similar to Toggle Button Using Bootstrap

Aman Gupta
Updated on 11-Apr-2023 16:05:14

1K+ Views

Overview We can create a radio button same as the toggle button which can be used in our web application in the part where we have to choose the options or regarding changing actions. In creating the radio button we can use the bootstrap predefined classes which will help us to build a radio button. A toggle button is a button which is the same as a normal button toggleable button and a radio button is a button with a checkbox like shape in front of the option. Content Delivery Network (CDN) Links These CDN links are used to ... Read More

Create Progress Bar Using HTML and CSS

Aman Gupta
Updated on 11-Apr-2023 16:03:32

2K+ Views

Overview The progress bar is the main component for any web application. The progress tells the completion of a certain project or task. In this module we will build the progress bar using the HTML and will style it through the CSS. We will also provide the progress animation to our progress bar. In this task we will use the @keyframes to make the progress bar animated. Using the animation styling property such as animation duration, name, timing, etc. Algorithm Step 1 − Create a HTML boilerplate in your text editor. Step 2 − Create the parent div container ... Read More

Create Progress Bar in Different Colors in Bootstrap

Aman Gupta
Updated on 11-Apr-2023 16:01:18

919 Views

Overview Bootstrap provides beautiful ways to build the components to our website. The bootstrap comes up with certain classes by using these classes in our tags. A whole component can be built very nicely without adding an external style sheet, but if we want to make some changes to the component then we can add a stylesheet to it. To create a simple progress bar with the help of bootstrap, we will use certain bootstrap classes these are − progress progress-bar If we want to create a progress bar with the animated striped, bootstrap has its own ... Read More

Create Pop-Up Div on Mouse Over with jQuery

Aman Gupta
Updated on 11-Apr-2023 15:51:28

4K+ Views

Overview The pop-up div can be created with the help of HTML, CSS and the functioning of which can be done with the help of ‘Javascript’ library ‘jQuery’. To make the mouseover and stay functionality to the div jQuery has a built in pre defined function. The two functions which are mainly used in this task are − mouseover − This function triggers when the mouse is over the selected element. mouseout − This function triggers when the mouse leaves the are of the selected element for mouse over. Algorithm Step 1 − Create a ... Read More

Search User-Defined Object from List Using Binary Search Comparator in Java

Rudradev Das
Updated on 11-Apr-2023 15:49:36

336 Views

Java comparator interface used to sort Java objects. A comparator class in Java compares the different objects (Obj 01, Obj 02) by invoking the "java. util. comparator". In this method the objects can be compared on the basis of the return value. It can be positive, equal or negative in comparison. The process provides user multiple sorting sequences. There are lots of method by which we can perform the comparison between two methods. public int compare class (obj 1, obj 2) - Perform comparison between two objects. public Boolean equals (obj) - Compare current object with specified object. ... Read More

Advanced Backcross Quantitative Trait Locus (AB-QTL) Analysis

Anusha Karthik
Updated on 11-Apr-2023 15:49:26

251 Views

Introduction Agricultural research has come a long way over the years, with the advent of new technologies and methods. One such method is Advanced Backcross Quantitative Trait Locus (AB-QTL) analysis, which has revolutionized the field of plant breeding. AB-QTL analysis is a powerful tool used to identify the genetic basis of complex traits in plants. It involves crossing two different plant varieties, and then backcrossing the offspring with one of the parents repeatedly, in order to create a population with a high degree of genetic diversity. This population is then screened for quantitative trait loci (QTLs) that are associated ... Read More

Create Nofollow Link Using HTML5

Aman Gupta
Updated on 11-Apr-2023 15:48:39

568 Views

Overview In simple language, a “nofollow” link is a link which tells the google search engine to not to follow the particular link. As when it comes to the search engine optimization of the page, time the links play a vital role in the ranking of the page. In the HTML5 we can make any link a nofollow link by assigning the nofollow attribute to the anchor tag. Syntax The basic syntax used to create any link a nofollow link is −

Create a Navbar in Bootstrap

Aman Gupta
Updated on 11-Apr-2023 15:47:22

1K+ Views

Overview A navbar is a common component in any web application. A navbar can also act like a header which contains a logo of an organization or the brand which represents the website. It also contains the navigation part of the website through which we can navigate through a part of the website directly. To make a navigation bar using bootstrap can be achieved by integrating some of the predefined navbar classes to a nav element which will slightly help us to build a navbar. There are some predefined bootstrap classes that must and will provide a shape to ... Read More

Advertisements