Check Permutation of S2 by Modifying S1

Aishwarya Mani Tripathi
Updated on 08-Sep-2023 16:51:05

118 Views

Checking if a permutation of S2 can be obtained by adding or removing characters from S1 is a common problem in computer science. This problem is of great significance in various domains, including data processing, text analysis, and pattern recognition. In this tutorial, we will be presenting a solution to this problem using C++ programming language. The approach involves analyzing the characteristics of S1 and S2 to establish whether S2 can be rearranged to form a permutation of S1. We will be providing the C++ code for this approach along with explanations to help readers understand the problem ... Read More

Advantages and Disadvantages of HTML

Yaswanth Varma
Updated on 08-Sep-2023 16:09:13

2K+ Views

The language used to create web pages is known as HTML (Hypertext Markup Language). It is a markup language rather than a real programming language. Hypertext is text that contains an embedded link to another web page or website. HTML is mostly used to lay the groundwork for and structure a webpage. Html serves as the foundation of web pages. All of the websites you visit use HTML to some degree. Every web developer  has to learn HTML, to begin with. HTML5 is the most recent and most advanced version of HTML. Together with CSS3, it performs fantastically. If you're considering ... Read More

Create 3D Text Effect Using HTML and CSS

Yaswanth Varma
Updated on 08-Sep-2023 16:00:02

2K+ Views

In the field of web design, the 3D text effect is one of the most popular text effects. One should be able to build a 3D text effect as a designer or front-end developer. Today, we'll examine one of the simplest and most straightforward techniques for rendering text in 3d look. The text-shadow attribute is what gave the 3D text movement effect its design. The purpose of applying several text-shadows is to give the word a 3D appearance since if we simply applied a single (or unitary) text-shadow, it would be the same for all of the alphabets in the ... Read More

Tech Number in Swift

Ankita Saini
Updated on 08-Sep-2023 15:59:09

198 Views

If the given number contains an even number of digits and the digits of the number can be divided into two equal parts from the middle. After dividing the digits sum up the divided digits and find the square of the final sum. If the square is equal to the sum itself then the given number is a tech number otherwise not. Example Demonstration Input 3025 Output Yes the given number is a tech number Input 2341 Output No the given number is not a tech number Here, 3025 is a ... Read More

Print Floyd's Triangle in Swift

Ankita Saini
Updated on 08-Sep-2023 15:56:06

311 Views

Floyd triangle is right angle triangled which is named after Rober Floyd. It is created with the help of natural numbers starting from 1 in the top left corner and then the consecutive numbers are filled in the specified rows. Example Demonstration Input 4 Output 1 2 3 4 5 6 7 8 9 10 Here, the size of Floyd’s triangle is 4. So it will print Floyd’s triangle until 4 rows. In Swift, we can print Floyd’s triangle using the following methods: Using for−in loop Using while loop Using recursive function Algorithm ... Read More

Write Calculator Program Using Switch Case in Swift

Ankita Saini
Updated on 08-Sep-2023 15:51:06

989 Views

A Calculator is an electronic device which is used to perform different types of mathematical operations like subtraction, addition, division, multiplication, etc. We can also create a calculator using Switch case and simple arithmetic operations in Swift programming. It will also perform the same mathematical operations as the original calculator. Example Demonstration Enter any two numbers: Number 1: 43 Number 2: 234 SIMPLE CALCULATOR 1. Addition 2. Subtraction 3. Multiplication 4. Division 5. Percentage Choose (1/2/3/4/5): 2 Result = -191.0 Here, we first enter the numbers on which we want to perform the ... Read More

Swap Pair of Characters in Swift

Ankita Saini
Updated on 08-Sep-2023 15:35:03

532 Views

Swapping pair of characters is a process of interchanging the position of two characters in the given string. This operation is commonly used in various programming languages and applications to manipulate data. Example Input “mumbai” Output umbmia Input “Prita” Output rPtia Here, we divide the given string into a pair of characters like “mumbai”: “mu”, “mb”, “ai”. Now we swap the positions of the characters: “um”, “bm”, and “ia” and create the resultant string: “umbmia”. Similarly for input 2. In Swift, we can swap the pair of characters present in the given ... Read More

Design a Table Using Table Tag and Its Attributes

Yaswanth Varma
Updated on 08-Sep-2023 15:33:13

404 Views

The task we are going to perform in this article is to design a table using tag and its attributes. For creating the structure of the table we use the and later we use attributes to design the table. Let's dive into the article for getting more idea on creating a table using the tag and its attributes. We use the tag to build a table, and its characteristics will be used to design the table. Cellspacing, cellpadding, border, background color, and other attributes will be used to design the table. HTML tag We occasionally ... Read More

Calculate the Volume of a Tetrahedron in Swift

Ankita Saini
Updated on 08-Sep-2023 15:30:27

142 Views

Tetrahedron is a triangular base pyramid. It is a platonic solid with four triangular faces, six straight edges and four vertex corners. Where each vertex is connected with every other vertex and each face is of an equilateral triangle. In Swift, we can calculate the volume of a tetrahedron using the following formula: Formula $$\mathrm{Area=(x*x*x*\sqrt{2})/12}$$ Here, x represents the sides of the tetrahedron. Algorithm Step 1 − Create a function which takes the side of the tetrahedron as a parameter and returns the volume. Step 2 − Inside the function, we use the mathematical formula to find the volume ... Read More

Add Telephone Number to a Form Using HTML5

Yaswanth Varma
Updated on 08-Sep-2023 15:17:40

989 Views

The task we are going to perform in this article is to add a telephone number into a form using HTML5. We are aware of the numerous benefits of using phone numbers. In case you need to collect a user's personal information, a telephone number is crucial. Additionally, a user may receive numerous messages or notifications on the form services. Let's dive into the article for getting better understanding on adding a telephone number into a form using HTML5. This can be done by using the . Using Tag A phone number can be entered and edited using ... Read More

Advertisements