Java Program to Find Length of the Longest Substring Without Repeating Characters

Prabhdeep Singh
Updated on 22-Jul-2024 14:43:59

838 Views

The substrings are part of the string which contains the continuous character of the string of any length from 1 to complete string. We are given a string and we have to find the length of the largest substring from the given string that only contains the unique characters. We will see three types of methods: finding every substring, sliding windows, and two-pointers. Problem Statement Given a string, write a Java program to find length of the longest substring without repeating characters − Input thisisthegivenstring Output The length of the longest substring that contains only unique characters is: 8 ... Read More

How to set float input type in HTML5?

Timpol
Updated on 22-Jul-2024 13:48:58

7 Views

Sometimes, we must provide an input field that accepts float value. There are two ways to do so, suppose you design a form where you have asked for the CGPA of any student to fill the form or a form where you have asked for the CTC these numbers could be a floating number. What is the float input type? A number with a decimal place is referred to as a float or floating-point number. Floats are used when we need to increase accuracy. Approachs to set the float input Type That being said, HTML5 does not support the ... Read More

Set the limit of text length to N lines using CSS

Shubham Vora
Updated on 22-Jul-2024 13:06:47

9K+ Views

To set the limit of text length to n lines, it can help in more organized presentation of text and better readability. This process is also known as truncating. In this article we will be understanding diifferent approaches to truncate the text. In this article, we are having a div element with some text content in it. Our task is to limit the text length to N lines using CSS. Approaches to Set the Limit of Text Length to N Lines Here is a list of approaches of how to Set Color of Progress Bar using HTML and CSS with ... Read More

Difference Between Vector and List

Shirjeel Yunus
Updated on 22-Jul-2024 11:34:04

14 Views

Vector and List are present in many programming languages like C++, R, etc. and they are used to add and remove elements. These elements can be accessed randomly in a vector but not in a list. In this article, we will discuss the difference between vector and list in C++. What is Vector in C++? A vector is a container which works as a dynamic array. It can be used to store elements whose datatype is same. Vectors also have a characteristic of growing or shrinking at runtime. Vectors belong to the Standard Template Library (STL) and header file ... Read More

Difference between Parallel and Sequential Streams in Java

Shirjeel Yunus
Updated on 22-Jul-2024 11:28:53

3 Views

Stream was introduced in Java 8 and it was included as java.util.stream package. It is a sequence of objects which acts as an array or a collection. Different types of methods are supported by stream. Besides this, stream also supports different kinds of aggregate operations which include − Filter Map Reduce Limit Match Find The source is not affected when any of these operations are performed on a stream. Instead of this, a new stream is created to apply these operations. There are two types of streams which are sequential and parallel. In this article, we will discuss ... Read More

Java program to remove duplicate elements from ArrayList

AmitDiwan
Updated on 22-Jul-2024 10:57:07

3K+ Views

In this article, we will understand how to remove duplicate elements from ArrayList. The ArrayList class is a resizable array, which can be found in the java.util package. The difference between a built-in array and an ArrayList in Java, is that the size of an array cannot be modified. Problem Statement Given an ArrayList write a Java program to remove duplicate elements from ArrayList. Below is a demonstration of the same − Input Input list : [150, 250, 300, 250, 500, 150, 600, 750, 300] Output The list with no duplicates ... Read More

Difference Between @Controller and @RestController Annotation in Spring

Shirjeel Yunus
Updated on 22-Jul-2024 10:55:48

7 Views

Spring Annotations can be referred to as metadata which provides information related to a program. Supplemental information of a program can be derived from annotations. The annotation will not affect the program nor the action of the compiled program be changed. Spring annotations are of two types which are @Controller and @RestController. In this article, we will see the difference between @Controller and @RestController. What is @Control Annotation? Spring @Controller Annotation is responsible for informing that a particular class can behave in the form of a controller. The @Controller annotation and the annotated handler methods are used in combination with ... Read More

How to change the color of the radio button using CSS?

Shabaz Alam
Updated on 19-Jul-2024 15:27:07

21K+ Views

To change the color of the radio button using CSS, is a simple process that can be achieved using various approaches. In this article, we will learn and understand two different approach for changing the color of the radio button using CSS. Radio buttons allows to select one option out of many available options. In this article, we are having a radio button and our task is to change the color of radio button using CSS. Approaches to Change the Color of the Radio Button Here is a list of approaches to change the color of the radio button using ... Read More

Java program to check the birthday and print happy birthday message

AmitDiwan
Updated on 19-Jul-2024 14:23:10

2K+ Views

In this article, we will understand how to check the birthday and print Happy Birthday message. Checking the birthday is accomplished by comparing the present day and the given birthday. Problem Statement Write a program that checks if today's date matches a predefined birthday date. If the dates match, the program should print a "Happy Birthday" message otherwise, it should indicate that today is not the birthday. Below is a demonstration of the same − Input Birthday Date: 15 July Output Today’s Date is 20-12-2021 Today is not my birthday Check the Birthday Using LocalDate ClassBelow are the steps to check ... Read More

How to create a signup form with HTML and CSS?

AmitDiwan
Updated on 19-Jul-2024 13:26:37

13K+ Views

In this article, we will be understanding How to create a signup form with HTML and CSS. A sign-up form allows any new user visiting the website to register. It includes adding an email-id, password, repeat password, and clicking on the Sign-Up button to register. To allow the browser to save the password, click the Remember Me. You can also provide a Terms & Policies link so the users can first read the registration terms. Let us see how to create a signup form with HTML and CSS. Steps to Create Sign Up Form We are following 2 steps to ... Read More

1 2 3 4 5 ... 10874 Next
Advertisements