We have given a singly linked list of characters, and our task is to print the character which occurs the maximum time in the linked list. If the multiple characters have the same count of occurring then print the character which comes in the last. The Singly-linked list is a linear data structure that consists of nodes. Each node contains the data and the pointer to the next node which contains the memory address of the next node because the memory assigned to each node is not continuous. Sample Examples Let us assume we have given a linked list of ... Read More
Introduction Chemotherapy (CT) is a medical technique involving drugs to target cancer cells. These drugs can be administered orally, intravenously, or topically. Chemotherapy affects not only cancer cells but also healthy cells, which can result in side effects and discomfort. The procedure is often coupled with other procedures such as surgery and radiation procedures to enhance the effectiveness of cancer treatment. Cancer treatment Cancer treatment involves a range of therapies, such as surgery, radiation, medications, and other treatments. The objective of cancer treatment is to eliminate cancer or shrink cancer. Based on the type and stage of the ... Read More
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
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 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
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
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
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
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
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
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP