
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 26504 Articles for Server Side Programming

291 Views
Suppose we want to make a target string of lowercase letters.At first, we have the sequence as n '?' marks (n is the length of target string). We also have a stamp of lowercase letters.On each turn, we can place the stamp over the sequence, and replace every letter in the with the corresponding letter from that stamp. You can make up to 10 * n turns. As an example consider the initial sequence is "?????", and the stamp is "abc", then we may make strings like "abc??", "?abc?", "??abc" in the first turn.If the sequence is possible to stamp, ... Read More

2K+ Views
In this problem, we are given some numbers. Our task is to create a Program to Find the Largest Number using Ternary Operator in C++.The elements can be −Two NumbersThree NumbersFour NumbersCode Description − Here, we are given some numbers (two or three or four). We need to find the maximum element out of these numbers using a ternary operator.Let’s take a few examples to understand the problem, Two NumbersInput − 4, 54Output − 54Three NumbersInput − 14, 40, 26Output − 40Four NumbersInput − 10, 54, 26, 62Output − 62Solution ApproachWe will use ternary Operator, for two, three and four ... Read More

2K+ Views
In this problem, we are given a string. Our task is to create a program to find the largest and smallest ASCII valued characters in a string in C++.Code Description − Here, we have a string that consists of both upperCase and lowerCase characters. And we need to find the characters that have the largest and the smallest ASCII value character.Let’s take an example to understand the problem, Inputstr = “TutroialsPoint”OutputLargest = u smallest = P.ExplanationAccording to ASCII values, upperCase characters are smaller than lowerCase characters.So, the smallest character of upperCase characters (A) has overall the smallest ASCII value. The ... Read More

226 Views
In this tutorial, we will be discussing a program to find the kth character after decrypting a string.For this, we will be provided with a string that will consist of characters and numbers and integer K. Our task is to decrypt the given string and find the character at Kth position.Example Live Demo#include #include using namespace std; //finding decrypted Kth character char findKthChar(string s, int k) { int len = s.length(); int i = 0; int total_len = 0; while (i < len) { if (isalpha(s[i])) { total_len++; ... Read More

577 Views
Suppose we have a grid. There are few symbols. "." is indicating empty cell, "#" is for wall, "@" is for starting point, ("a", "b", ...) all are keys, and ("A", "B", ...) all are locks. We will start from the starting point, and one move consists of walking one space in one of the 4 directions (left, right, top, bottom). We will not go outside the grid, and there are walls to block our way. If we walk over a key, we pick it up. We can't walk over a lock unless we have the corresponding key.For each lock ... Read More

1K+ Views
In the program, we are given a string name that denotes the name of a person. Our task is to create a Program to find the initials of a name in C++.Code Description − Here, we have to find the initials of the name of the person given by the string.Let’s take an example to understand the problem, Inputname = “ram kisan saraswat”OutputR K SExplanationWe will find all the first letters of words of the name.Solution ApproachA simple solution to the problem is by traversing the name string. And all the characters that appear after the newline character or space ... Read More

484 Views
In this problem, we are given a number n that denotes the sides of a regular polygon. Our task is to create a Program to find the Interior and Exterior Angle of a Regular Polygon in C++.Problem Description − Here, for the given number of sides, we will find the value of each interior and exterior angle of the regular polygon of side n.Interior Angle is the angle between two adjacent sides of a polygon that lies inside the polygon.Exterior Angle is the angle between two adjacent sides of a polygon that lies outside the polygon.Let’s take an example to ... Read More

408 Views
In this problem, we are an array arr[] consisting of n integer values. Our task is to create a Program to find the Hidden Number in C++.Code description − For an array, the hidden number, is the number which when subtracted from each element of the array gives the sum 0.Let’s take an example to understand the problem, Inputarr[] = {4, 1, 6, 7, 2}Output4Subtracting 4 from all elements of the array. And adding of values= (1 - 4) + (6 - 4) + (7 - 4) + (4 - 2) = -3 + 2 + 3 - 2 = ... Read More

420 Views
Suppose we have a list of (axis-aligned) rectangles. Here each rectangle[i] = {x1, y1, x2, y2}, where (x1, y1) is the point of the bottom-left corner, and (x2, y2) are the point of the top-right corner of the ith rectangle.We have to find the total area covered by all rectangles in the plane. The answer may be very , so we can use modulo 10^9 + 7.So, if the input is likethen the output will be 6.To solve this, we will follow these steps −m = 10^9 + 7Define a function add(), this will take a, b, return ((a mod ... Read More

157 Views
In this problem, we are given two integers that give the head start that is given by A to B and C respectively in a 100-meter race. Our task is to create a program to find the head start in a race in C++.Code Description − Here, there are head starts that are given by A to B and A to C respectively in a 100-meter race. We need to find the relative head start that is given by B to C in the 100-meter race.Let’s take an example to understand the problem, Input20, 28Output90ExplanationA gives B a head-start of ... Read More