Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles on Trending Technologies
Technical articles with clear explanations and examples
Count ways to form N Sized Strings with at most two adjacent different pair
In this problem, we will count the number of binary strings of size N, containing at most 2 adjacent distinct pair of characters. It means the string should contain, at most, 2 '01' 0r '10' pairs. The first approach is that generate all binary strings, and if any binary string contains less than or equal to 2 distinct pairs of characters, include its count in the result. For the optimal solution, we can count a number of binary strings containing 0, 1, and 2 adjacent different pairs and sum them. Problem statement - We have given a positive ...
Read MoreCount Substrings with at least one occurrence of first K alphabet
In this problem, we need to count substrings containing a minimum 1 occurrence of all K characters. Here, we will use two different approaches to solve the problem. The first approach takes all substrings of the given string, checks whether the substring contains all K characters, and counts such substrings containing all K characters. The second approach uses the sliding window technique to solve the problem. Problem statement - We have given a string alpha containing N characters. Also, we have given K, representing the string containing multiple occurrences of only the first K alphabetical characters. We ...
Read MoreCount of Strings of Array having given prefixes for Q query
In this problem, we will count the number of strings containing query string as a prefix for each query string. We can traverse the list of query strings, and for each query, we can find a number of strings containing it as a prefix. Also, we can use the trie data structure to solve the problem. Problem statement – We have given an strs[] and queStr[] string array containing N and Q strings, respectively. We need to count the number of strings from the Strs[] array containing the queStr[i] string as a prefix for each string of ...
Read MoreCheck if string S can be converted to T by incrementing characters
In this problem, we will check whether it is possible to convert string S to T by incrementing the characters of S only once according to the given condition. Here, we can increment any characters by 'I' only once. So, If we need to increment any other character by 'I' times, the value of K should be greater than 26 + I. Problem statement – We have given a string S, T, and positive integer K. We need to convert the string S to T by following the rules below. We can take ...
Read MoreHow to compare two lists of email addresses in Excel worksheet?
Sometimes to maintain the uniqueness of all values available in a workbook, we require to eliminate duplicate values from the dataset. A case of duplicity may arise when there are two columns having email addresses and you want to find the repeating ones in one of the columns. This can be achieved using the below steps. Comparing two columns of Email Addresses to Find the Same values using Formula Step 1: We have taken a sample data as following. Here we have taken two columns having some email addresses and a third column in which we will display ...
Read MoreHow to compare two columns and return values from the third column in Excel?
In this article we will learn how to compare values of two columns to get the values from the third column. For example, we have taken a column with Class Names and along with each class name, student name has been written in another column. Now, we will get the students name in another column against some randomly taken class names. Let’s see how this can be achieved using an excel formula. Compare two columns and getting value from third column with VLOOKUP function Step 1: We have taken the following sample data for comparison. Step ...
Read MoreCompare two columns and list differences with formulas.
For instance, we have two columns in a data set having some names. And now we want to identify what names are repeating in either list. For this, we can apply a formula in two other columns, to get the unique values of both the columns. Let’s see how we can achieve this. Compare two columns and list differences with formulas Step 1: We have taken the following sample data for comparison. Step 2: Enter the formula in E2 cell as mentioned below. This formula will return the unique names of column 1, which are not ...
Read MoreHow to Compare Two Cells and Return Yes If They Are Matched In Excel?
When we have a bunch of data and need to compare rows and columns to maintain uniqueness then we might need to apply multiple formulas to the dataset. For instance you have two or more columns and want to compare the values of each row of all columns and return Yes or True of they get matched completely. This can be achieved using the below steps. Compare two cells of two columns and return yes if they are perfectly Matched using Formula Step 1: We have taken the following sample data with some random details. After comparing each ...
Read MoreHow to compare alphanumeric values in two columns in Excel?
Many times, we need to compare and identify the duplicate entries available in various columns of the excel data. Searching the duplicate entry of each value one by one is a tedious task. This can be achieved through a formula combination of excel sheet. Let’s see how the same can be achieved using the below steps. Compare alphanumeric values in two columns to find the same duplicates Step 1: We have taken the following sample data for comparison. Step 2: Enter the formula in C2 cell as mentioned below. This formula will return Duplicate for those ...
Read MoreHow To Clear Specified Cell Contents On Open And Exit In Excel Workbook?
In this article we will learn how to remove specific cell contents while opening or closing an excel workbook. This activity can be done through VBA codes that can be applied individually at a time. Either on closing the file or opening the file. This feature can be useful when you have performed some calculations or analysis at a specific range in the workbook and want the same to clear as soon as you close the file or open the file next time. Let’s see how the VBA code can be applied. Clear Specified Cell Contents on Workbook Open ...
Read More