Check If the Summation of Two Words Equals Target Word

Prabhdeep Singh
Updated on 17-May-2023 14:52:42

138 Views

We will be given three strings str1, str2, and str3 in this problem of the same or different lengths and we have to find whether the sum of the first two strings is equal to the third or not. Each of the strings contains elements less than ‘k’ which means ‘a’ can be decoded as ‘0’ and j as ‘9’ and we can take the sum of them as the normal numbers. Sample Examples Input 1 string str1 = “abc” string str2 = “bbe” string str3 = “cdg” Output: Yes Explanation − We can decode ‘a’ as ‘0’, ‘b’ as ... Read More

Full Form of CST

Praveen Varghese Thomas
Updated on 17-May-2023 14:47:56

512 Views

Introduction Central Sales Tax, Chhatrapati Shivaji Terminus, and Central Standard Time (CST) encompasses distinct significances in different contexts. According to the Indian tax scheme, CST refers to the Central Sales Tax, which is imposed on inter-state sales of goods. Chhatrapati Shivaji Terminus, shortened as CST, is a historic railway station in Mumbai, India. Central Standard Time, normally shortened as CST, is a time zone used in North America, comprising parts of the United States, Canada, and Mexico. Chhatrapati Shivaji Terminus: Historical Landmark Chhatrapati Shivaji Terminus, located in Mumbai, India, is a chronological landmark that carries substantial cultural and ... Read More

Lexicographically Smallest String by Deleting a Character from Substring

Prabhdeep Singh
Updated on 17-May-2023 14:45:51

447 Views

Lexicographically smallest string means among the set of strings is the string which appears first in the dictionary order is known as a lexicographically smallest string. We will be given a binary string (that contains only two different types of characters 0 and 1) and we can delete character ‘1’ from any substring ‘10’ from the given string at any number or time. We have to create the lexicographic string by applying this method. Sample Examples Input 1 string str = “1101010011” Output: 000011 Explanation − As we can only remove the character ‘1’ so will remove all the ones ... Read More

Maximum Pairs of Bracket Sequences for Regular Concatenation

Prabhdeep Singh
Updated on 17-May-2023 14:44:06

257 Views

Regular Bracket Sequence means a string that contains the parentheses of both opening and closing types and results in properly closed brackets. The given sequence may be properly symmetrical and maybe not. In this problem, we are given a list of string that contains the bracket sequences and we have to find the number of pairs that can be concatenated to a single regular bracket sequence. Sample Examples Input 1 string arr[] = {“)()”, “()(“, “()()”, “(())”} Output: 2 Explanation − For the first and second strings we can concatenate the first string after the second string resulting in the ... Read More

Maximum Count of 0s Between Two 1s for Q Queries

Prabhdeep Singh
Updated on 17-May-2023 14:41:15

330 Views

A binary string is a string that only contains the zeroes and ones as the different characters in them. We are given a binary string and an array of a given length that will contain the pairs. Each pair defines the range, and in that range, we have to return the maximum number of zeros lying between two ones. We will implement two approaches one is the naive approach and another is the efficient approach. Let’s understand with the help of example Input String str = ‘1011010110’ Array Q[][] = {{0, 2}, {2, 5}, {0, 9}} Output: 1 1 3 ... Read More

Minimum Cost for Constructing Subsequence of Length K from Given String

Prabhdeep Singh
Updated on 17-May-2023 14:39:01

257 Views

We will be given a string of length n, an integer k, and an integer array of length 26. The integer array defines the cost of each lowercase character and the string will contain only lowercase letters. We have to create a subsequence of length k from the given string at the minimum possible cost. We will use sorting to solve the problem and will implement a code with a full explanation. Sample Examples Input 1 Given string: acbcbac Given number: 4 Given array: {2, 3, 1, 2, 4, 5, 5, 6, 6, 2, 1, 0, 4, 3, 5, ... Read More

Find N-Length Binary String with Maximum Sum from Given Ranges

Prabhdeep Singh
Updated on 17-May-2023 14:36:19

226 Views

We will be given an array that will contain the pairs which represent the range and their value will range from 0(inclusive) to N(exclusive). Here, N is the size of the binary string which we have to return as the answer. For all the given ranges we have to maximize the sum of the product of the frequencies of zero and one. We will implement two approaches one is the naive approach by finding all the strings and another is the efficient solution. Sample Examples Input 1 Given array: {{1, 3}, {2, 4}, {2, 5}} Length of string: 6 Output ... Read More

Full Form of CSIR

Praveen Varghese Thomas
Updated on 17-May-2023 14:35:34

247 Views

Introduction Council of Scientific and Industrial Research (CSIR) is a renowned association in India that is responsible for promoting scientific knowledge, fostering innovation and contributing to worldwide development. The headquarter of CSIR is in New Delhi and it has a network of more than 37 institutes and laboratories all over the country. The Council of Scientific and Industrial Research performs research in varied fields like agriculture and food, energy and environment, pharmaceuticals etc. Research Areas of CSIR The Council of Scientific and Industrial Research (CSIR) is an analysis association in India that executes cutting-edge studies in a wide ... Read More

Sort Array by Swapping Adjacent Elements from Indices Containing '1' in a Given String

Prabhdeep Singh
Updated on 17-May-2023 14:33:57

485 Views

Sorting an array means ordering all the elements of the array in increasing order. Sorting an array by swapping adjacent elements means we can only swap elements that are adjacent to each other but we can swap adjacent elements any number of times. We will be given a binary string that will contain only two types of characters ‘0’ and ‘1’. If any character is ‘0’ in the given string then we cannot swap the element present at that index of the array with adjacent elements. Sample Examples Input 1 Given array: {1, 4, 3, 2, 5, 7, 6} Given ... Read More

What Are Mobile Genetic Elements

Vishala M
Updated on 17-May-2023 14:32:06

415 Views

Introduction In prokaryotes, genetic material is transferred from parents to offspring by cell division like binary fission. This type of transmission via cell division is known as vertical transmission. Now there is another type of transmission called horizontal transmission that does not involve cell division, but the transfer of genetic material takes place with the help of three mechanisms namely transformation, transduction, and conjugation. These three mechanisms take place with the help of certain DNA sequences that are capable of encoding proteins and enzymes and these sequences are known as mobile genetic elements. Not only in prokaryotes they are also ... Read More

Advertisements