Found 27104 Articles for Server Side Programming

Largest number not exceeding N that does not contain any of the digits of S

Way2Class
Updated on 20-Jul-2023 18:48:49

85 Views

The challenge of finding the largest number not exceeding a given number N and not containing any of the digits in a string S is a problem that involves string manipulation and number theory. The goal is to determine the greatest possible number that is less than or equal to N while also excluding all of the digits found in the string S. For instance, consider a scenario where N is equal to 1000 and S is equal to "42". In this scenario, the largest number not exceeding N and not containing any of the digits in S would be ... Read More

Remove all the occurrences of a character from a string using STL

Way2Class
Updated on 20-Jul-2023 18:45:13

2K+ Views

STL basically stands for Standard Template Library, which is a collection of pre-written code frequently used in Data structures and Algorithms. It was developed in the early 1990s by Meng Lee and Alexander Stepanov. It consists of mainly three components known as containers, algorithms and iterators. Containers are objects that stores and manipulate data such as list, vector, set, map and stack. Algorithm are functions which works on the data stored in the containers such as searching, sorting and also manipulating data. Iterators are object that navigates through the elements of a container easily. STL has became an ... Read More

Count removal of pairs required to be empty all Balanced Parenthesis subsequences

Way2Class
Updated on 20-Jul-2023 17:39:09

36 Views

C compiler treats a string as an array of characters, so it is easy to remove characters of a string based on their position. The first and last position of the string have to be checked for the presence of parenthesis and have to be removed. The string can be copied into another variable and presented. There are many predefined functions in C that can be used effectively to manipulate strings. Removing a character from the starting or ending position is easily achieved in C with the help of the functions. Removing starting and ending paranthesis from string ... Read More

Count of primes after converting given binary number in base between L to R

Way2Class
Updated on 20-Jul-2023 17:36:33

66 Views

The title "Count of primes after converting given binary number in base between L and R" refers to a math problem that involves converting a binary number into a base between L and R and then counting the number of prime numbers that come from the conversion. In math, a prime number is a whole number that is greater than 1 and can only be divided by 1 and itself. To turn a binary number into a number with a different base, the number has to be written in a different number system. The number system's base is the number ... Read More

How to validate GST (Goods and Services Tax number using Regular Expression?

Way2Class
Updated on 20-Jul-2023 17:21:46

2K+ Views

The government issues a unique identification number known as a GST number to businesses and individuals who have registered for GST. As part of the validation procedure, the GST number is checked for correctness and legitimacy. The format of the number is frequently checked during the verification process to make sure it is correct and conforms to the format needed by the tax authorities of the relevant country. In order to confirm the validity of the number and that it belongs to the person seeking it, the verification phase may also involve cross-referencing it with the database of the tax ... Read More

Golang Program to Creates Two Channels, One For Even Numbers And Another For Odd Numbers

Akhil Sharma
Updated on 20-Jul-2023 15:43:16

843 Views

In this article, we'll make two channels in Go: one for even numbers and another for odd numbers. We are going to send the even numbers to the even channel and the odd numbers to the odd channel.Here we are going to use two different methods: using creating even and odd channels and Sending Even and Odd Numbers to Channels  along with examples to elaborate the concept. Syntax close(evenChan) This is a built in function call used to close a channel. This make sure that no more value will be sent on the channel, and a send operation on ... Read More

Golang Program to Creates a Buffered Channel of Size 5 And Sends 10 Integers to The Channel Using a Loop

Akhil Sharma
Updated on 20-Jul-2023 15:41:39

81 Views

In this article, we focus on making a buffered channel of size 5 and sending 10 integers to the channel using a loop. The program illustrates how to make and utilize a buffered channel to send large values.Here we are going to use two different methods: by Sending integers to the channel using a loop and by creating a buffered channel along with examples to elaborate the concept. Syntax ch := make(chan int, bufferSize) The Syntax ch := make(chan int, bufferSize) creates a buffered channel ch of type int with a specified buffer size, allowing the sender to send ... Read More

Golang Program to Get Details About the Car Using Its Number Plate and Engine Number

Akhil Sharma
Updated on 20-Jul-2023 15:40:19

58 Views

In this article, the Golang program is designed to recover details of  a car utilizing its number plate and engine number. It allows users to input the car's data and bring important details such as owner name, registration details, and contact data. By giving  inputs, clients can rapidly get the data they require about a particular car.Here we are going to use three different methods: GetCarDetailsByPlateAndEngine, using validateinput  and using the retrievecardetails function along with examples to elaborate the concept. Syntax func GetCarDetailsByPlateAndEngine(plateNumber string, engineNumber string) (*CarDetails, error) the GetCarDetailsByPlateAndEngine function takes two string parameters (plateNumber and engineNumber), and ... Read More

Golang Program to Get Details About the Car Owner

Akhil Sharma
Updated on 20-Jul-2023 15:39:26

34 Views

In this article, we point to get details about the owner of a car. The program will ask the user to input the car enlistment number, and it'll recover the related information, such as the owner's title, address, and contact data. This program can be valuable in scenarios where car ownership data has to be rapidly accessed.Here we are going to use four different methods:PromptUserInput(), ValidateInput(registrationNumber string) bool, RetrieveOwnerDetails(registrationNumber string) (string, string, string), DisplayOwnerDetails(name, address, contact string) along with examples to elaborate the concept. Syntax func PromptUserInput() string The Syntax func PromptUserInput() string defines a function named PromptUserInput that ... Read More

Golang Program to Create a Slice of Person Structs Called People with at Least Two Elements

Akhil Sharma
Updated on 20-Jul-2023 15:37:05

98 Views

In this article, we are going to explore how to create a Go program that involves a slice of Person structs named People. The slice will contain a minimum of two elements, representing individuals with their respective names and addresses. By exploring the concept of slices and their usage in Go, we will learn how to effectively manage collections of data and perform operations on them. Let's dive in and explore how to work with slices in Go to handle a group of Person structs.Here we are going to use two different methods: using literal initialization and using the append ... Read More

Advertisements