
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 1860 Articles for Data Structure

374 Views
Inserting a number in the given number means adding a new given digit in the given number either at the front, end, or in between the numbers. We have given a number and a digit and have to add the digit in the number in a way such that the resultant new number will be minimum as possible. We will convert the number into a string to make the work of insertion easy. Also, the given number can be negative also so we have to consider this case. Sample Examples Input1 Given number: 124 Given digit: 3 Output: 1234 ... Read More

162 Views
A string will be given to us of length five which represents the time in the HH:MM format. There may be some ‘?’ present in the string and we have to replace them with any number such that the result is the valid time which could be the maximum possible. Also, the given string numbers will be valid, and ‘:’ will be present at the exact position of the string. We will use the two approaches first the brute force, and another the efficient approach. Sample Examples Input 1 Given string: 12:5? Output: 12:59 Explanation We have only one ... Read More

319 Views
Generating all possible strings is to replace a character of a string with a respective symbol and produce all possible strings. We will be given a string ‘s’ of size ‘N’ and an unordered map ‘mp’ of a pair of characters of size ‘M’. Here we can replace the mp[i][0] with mp[i][1] in the string ‘s’ and by doing this our task is to generate all possible strings. Sample Examples Input: s = “xyZ”, mp = {‘x’ : ‘$’, ‘y’ : ‘#’, ‘Z’ : ‘^’} Output: xyZ xy^ x#Z z#^ $yZ $y^ $#Z $#^ Explanation − In the ... Read More

233 Views
A binary string is a string that consists of only two different types of characters and that is ‘0’ and ‘1’. We will be given a binary string and the number m. We have to apply the operation to convert all the consecutive occurrences of the 0 and 1 that are ‘01’ and ‘10’ to ‘11’. One more condition is there that there must be only one neighbor of ‘0’ can be ‘1’. We can traverse over the string only m times where m will be given. Let’s understand with the following example Input 1: Given binary string: ‘01000101’ Given ... Read More

154 Views
In the normal number system, 0 is the smallest digit while 9 is the largest digit. In this problem, we will be given a list of the length 10, and starting from index 0 to index 9 it represents a digit, which indicates the priority of that digit and the list will be in increasing order means the digit present at the last index is the with highest priority. We will be given a number also and we have to find the next number which is the just greater than the current number. Input 1: Given number = “123” ... Read More

266 Views
A subsequence of a string means part of a string in which characters can be taken from anywhere of the string (zero or more elements) without changing the order of the characters and forming a new string. In this problem, we have given a string of length N where every character of the string belongs to either ‘A’, ‘B’, or ‘C’ character. Our task is to find that the string can be split only into subsequences “ABC” or Not. If the string is split only into subsequences “ABC” then return “yes” otherwise return “no”. Input 1: str = “AABCBC” ... Read More

597 Views
A binary string is a string that consists of only two different types of characters and that is ‘0’ and ‘1’, hare base is 2. And a decimal representation means each digit is lie between ‘0’ to ‘9’, here the base is 10. Here we have given a string of binary numbers and an integer k. we have to check if the decimal representation of the given binary string is divisible by k or not. If it is divisible then we have to return ‘yes’ otherwise return ‘no’. In the conversion of binary to decimal, we convert a base 2 ... Read More

195 Views
We will be given an array and have to choose an element from it and add that element to the sum. After adding that element to the sum, we have to remove three elements from the array if they exist current number, current number -1, and current number + 1. By this method we will make the array empty and will get a sum. At the end, we have to make the sum maximum. Input: [ 1, 2, 3] Output: 4 Explanation At first, we can have three moves, delete 1, 2, or 3. Let ... Read More

1K+ Views
Control structures and control statements are essential concepts in programming. A control structure could be a piece of code that controls the stream of execution of a program based on certain conditions. On the other hand, a control explanation could be a statement that performs a particular activity based on certain conditions. In this article, we'll investigate the difference between control structures and control explanations, their utilization, and how they contribute to the general usefulness of a program. We'll too talk about a few illustrations of commonly utilized control structures and articulations of completely different programming dialects. Control Structure A ... Read More

2K+ Views
SIMD stands for Single Instruction Multiple Data. A type of computer architecture in which a single instruction can be executed on multiple pieces of data in parallel is referred to as a SIMD (Single Instruction Multiple Data) architecture. Therefore, SIMD architecture is primarily used in parallel processing application where large amounts of data required to be processed at the same time. In the case of SIMD, a single instruction is executed on a group of data that are stored in contiguous memory locations. SIMD architecture is used in a variety of applications audio and video processing, simulations, 3D graphics processing, ... Read More