KEMBAR78
Milestone 1 Logic Building Questions | PDF | String (Computer Science) | Letter Case
0% found this document useful (0 votes)
26 views37 pages

Milestone 1 Logic Building Questions

Uploaded by

karthikmeda20
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views37 pages

Milestone 1 Logic Building Questions

Uploaded by

karthikmeda20
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 37

Problem-1 :

Input: Input1, Input2, Input3


Formula to be used:
key = (Hundreds place digit) * (tens place digit) - (max digit of input3)
Description: By using the above formula , firstly from the input1 it should return the hundreds place
digit , next from input2 it should return the tens place digit and from input3 it should return the
maximum of the number
Finally substitute the each and every return of three inputs in the given formula
Here we have 3 inputs:
input1: 3267
input2: 9453
input3: 2346
Now we should apply the formula
output: 256

Problem-2 :
Input : Given a string "WIPRO TECHNOLOGY"
Description: Here in the given input we should print the each word in the reverse format but not the
entire string
i.e, here we have a string with two words now it should return in the format of
Output: " ORPIW YGOLONHCET "
problem1:
write a function findkey in Java, which calculates a key based on the largest and smallest
digits of three input numbers. Let's correct and complete the implementation based on your initial
attempt:

GIVEN THREE INPUTS:


from the input1 take the largest number and also taken the smallest number from input1
from the input2 take the largest number and also take the smallest number from input2
from the input3 take the largest number and also take the smallest number from input3
formula:largest1=input1largest+input2largest+input3largest
smallest=input1smallest+input2smallest+input3smalllest
key=largest-smallest
testCases:
input1=123
input2=234
input3=235
largest=3+4+5=12
smallest=1+2+2=5
KEY=largest-smallest(12-5)=7

problem2:
Long Word: Consider a string input1. If length of input exceed 10 dead special abbreviation else,
return input1. Forming special abbreviation

• consider 1st and last characters from input1

• Count the remaining characters in between

Example1:

input1 = Localization

Expected output = L10n


Explanation: The length of the input string is 12. Since the length seats output should be the special
abbreviation formed by concatenating

- the first character of the input string (L)

- the count of all characters in between the first and last character of the p (10), and

- the last character of the input string ('ri).


----------------------------\
Problem 1:
Three numbers are given as input, find the maximum and minimum digit in all those
numbers and add them and return the result
Test Case 1:
input-1873 4294 3951
output-30
explanation-min digits-1,2,1
max digits-8,9,9
sum-1+2+1+8+9+9=30
Test Case 2;
input-3849 1524 9382
output-29
explanation-min digits-3,1,2
max digits-9,5,9
sum-3+1+2+9+5+9=29

Problem 2:
A string is given as input. find the ascii values of each character in the string which is a prime
number and return the result as a string by concatenating the characters whose ascii value is a prime
number along with the sum of those prime ascii values
Test Case 1:
input-"abgh"
output-"g:103"
explanation-ascii value of 'g' is 103 which is a prime number where the remaining all are not
prime numbers so result should be "g:103"
Test Case 2:
input-"cekl"
output-"ek:208"
explanation-ascii values of 'e' and 'k' are 101 and 107, their sum is 208. so the result is
"ek:208"
Problem-1:
---------
Statement:Given three inputs input1,input2,input3 in that find Hundreds digit in input1,tenth digit in
input2,Maximum digit in input3 and multiply all the inputs and return result
Example:
556,254,135
output:(5*5)*5=125
Sample testcase1:
123,345,675
Output:28
Sample testcase2:
234,435,561
Output:36

Problem-2:
---------
Statement:Extract strings which has starting and ending letter is vowel and concatenate the strings
extracted and return the concatenated string
Example:
string={"apple","orange","Mango"}
Output:appleorange
Sample testcase1:
{"aede","ice","cool"}
Otuput:aedeice
Problem-1:
Find the ordered word count.
The function accepts a string and returns an int return 0 if there are no ordered words in the input
string.
Input:
-------------
accept van

output:
---------------
2

Test Cases:
--------------------
->the words can contain both upper and lower case alphabets.
->asci value comparison should be done by considering the case.

Problem-2;
-----------------
To find key.
we have given 3 numbers each of these are four digit numbers within the range>=1000 and <==9999
1000<=input1<=9999
1000<=input2<=9999
1000<=input3<=9999

Input:
------------------
3521
2452
1352

Output:
----------------
2231
Problem1

sum of largest numbers and sum of smallest numbers.we have to sum largest number+sum smallest
number
inputs given =input1,input2,input3

Problem2

finding the vowels given string from first and last


given 2 inputs
1. problem 1:-(Return key)
They given three numbers range from 0 to 999. we have to return the key where the key =(sum of
largest digit of all three number)+(sum of smallest digit of all three numbers)
sample input:- input1:-123
input2:-456
input3:-135
sample output:-(3+6+5)+(1+4+1)=20

2.problem 2:-(Uncommon elements sum)

They given two arrays and have to return the uncommon elements sum
sample input:-input1[]={1,2,3}
input1[]={1,2,3,4,5}
sample output:-(4+5)=9
-----------------------------------------
Problem 1:

Given three inputs :input1,input2,input3


we have to extract maximum and minimum digit of all three numbers
and return the difference between them.

input: 3541,1354,1252

output:12

explanation:(5+5+5)-(1+1+1)=12
----------------------------------------------------------
Problem 2:

Find the sum of uncommon alphabets


given two char arrays
extract the uncommon alphabets of the two arrays and add the asci value until single digit

input1: ('A', 'B', 'C'} input2: {'B', 'C'}

output: 65 => 6 + 5 = 11 =>1+1=2

problems1:

three inputs and to find every input in max and min number and sum of max and min
input1:2351
input2:5673
input3:2345
output:
sum=(max1+max2+max3)+(min1+min2+min3)
sum=(5+7+2)+(1+3+2)
sum=20

problem 2:

given a string and find ordered number or not and count of words.ordered number means ascii
order.

input1:accept Van
output:2
input2:world
output:0

1.check length of string if length is less than 10 return string if length is greater than 10 return special
letter.
2.there are give three inputs each input range in grater than 1000 and <9999 find max min of digits
place and return digits place.
Problem1:

There will give 3 inputs we need to extract first input hundred's place number, and extract second
input Tens place number, and extract the max number in input3.then we calculate (hundreds_num *
Tens_num)*max_num.

input1:123
input2:234
input3:345

result = (1*3)*5 ==> 15 ==> return 15;

Problem2:

There will give a string and we need to check the string corresponding alphabets are following ascii
values in increasing order.if they are in increasing order we need to count how many words in string
are following this fashion. We need to return count.

input:"abc World"

we need to split "abc","World"

here "abc" follows ascii values in increasing order ==> count=1;

here "World" doesn't follows ascii values in increasing order ==> so count remains one if next world in
increasing order mean sthe count will be incremented;

for "abc World" string the count values 1 should been returned
problem 1:

1) given that 3 inputs (input1 ,input2,input3) where they given a formula key=(input1*input2)-input3

conditions :
input1 is thosands digit from the number
input2 is hunders digit from the number
input3 is max of the digit from the number.
sample :

1)1234
2)5342
3)-6780

(1*3)-8=-5
2) given the words of strings we need to check wheter they are in ascii value based increasing order

sample:

1)aant ,van

output :1
---------------------------------------
problem-1:
given three inputs we have to identify thousands place of first input and hundreds place of second
input and smallest digit of input3 then we have to multiply the thousand digit and hundreds digit then
add that with the smallest digit which we have identified.
problem-2:
given strings as input we have to check whether those are in alphabetical order or not.

Problem 1:

statement: Given a input of three numbers and find out the value of the key where
key= (thousand place of input1) + (hundred place of input2) * (max digit of the input 3)
1000<input1<9999
1000<input2<9999
1000<input3<9999

Input Format :
input1: 2512
input2: 1321
input3: 1412

output :
28 (key=(5+2)*4)

Problem 2:

statement: Given a input which contains set of words and we need to check whether they are ordered
numbers or not
ordered numbers means if the given word is in increasing order of ascii then they are ordered
words.
the input contains any no of words divided by space.

return 0 if there are no ordered words


else return no of strings which are ordered numbers(Ascii for a to b is 97 to 122 and A to Z is 65
to 90)

Input Format :

input: accept Van


Output :2

input :world
Output:0

PROBLEM STATEMENT-1:
You are provided with 3 numbers: input1, input2 and input3.
Each of these are four digit numbers within the range >= 1000 and <=9999. i.e. 1000 <= input1 <=
9999
1000 <= input2 <= 9999
1000 <= input3 <= 9999
You are expected to find the Key using the below formula - Key = (Thousands digit of input1 x
Hundreds digit of input2) - (Largest digit of input3)
For e..g. if input1 = 3521, input2=2452, input3=1352, then Key = (3 x 4) -5=7
Assuming that the 3 numbers are passed to the given function

***********************************************************************************
*************************************************************************

PROBLEM STATEMENT-2:

Program that shifts the characters of the given input strings according to the length of each word
EXAMPLE:
input1: Hi Hell
output: Jk Lipp
Explanation: H and i in the word "Hi" is shifte the length of "Hi" is 2
All the alphabets in the word "Hell" are shifted length of "Hell" is 4
Thus, the final output is "Jk Lipp".
problem-1:
given 3 inputs
take the thousands place of 1st input
take the hundreds place of 2nd input
take the maximum of 3rd input
multiply the first two and add it to the third number
input: 3874, 8735, 1875
(3*7)+1
21+1
22
-----------------------------------------------------------------
problem-2:
given a string
get the ascii values of the word
get the sum of all ascii values
if the sum is 2 or 3 digit
get the sum until it is single digit
input: AB
65+66
131
1+3+1
5
problem:
1.)find the key value with the three numbers provided ,in such a way that take 1000's value from the
input1 and 100's value from input2 and maximum value from input3.where key=(1000's value of
input1+100's value of input2)*max of input3.
example:
input1=1234
input2=2345
input3=1254
key=(1+3)*5=20
2.)find the given strings is in order or not ,here you are provided with string and you need to identify
if at all the provided strings are in order or not if they are in order give the length of the string as
output.
example:
1.)input=abcd
output=4
2.)input=asfec
output=0
Problem1:Key generation
Take three inputs all are four digit numbers from that take
I)max(thousands place of each digit among three numbers)
II)max(hundreds place of each digit among three numbers)
III)max(tens place of each digit among three numbers)
IV)max(units place each digit among three numbers)

input:1000 2210 1225 1587


output:7852
____________________________________________________________
Problem 2:
Given two Strings input1 and input2 consisting of random alphabets,

find whether all the alphabets in input1 are in either increasing or decreasing order based on their
ascii value.

For example,

input1="ACZa", its in increasing order. (65,67,90,97)

input1="tbGB", its in decreasing order. (116,98,71,66)

Example-1

input1: ACZa

input2: CAZa

output: Increasing:2

Example-2

input1: tbGB

input2: 1GBb

output: Decreasing:3
Problem 1
given four inputs i.e,input1,input2,input3,input4 here we have to find out the biggest no of tens
placed in all four inputs like that we have to find out hundreds digits, thousand digits, one's digits and
now we have to return all those numbers.

problem 2

Program that shifts the characters of the given input strings according to the length of each word
EXAMPLE:
input1: Hi Hell
output: Jk Lipp
Explanation: H and i in the word "Hi" is shifte the length of "Hi" is 2.
All the alphabets in the word "Hell" are shifted length of "Hell" is 4.

Problem-1

I have given three 4 digit integer inputs


input 1:4924
input 2:5632
input 3:7936

i need to find the max number of all inputs and min number of all inputs

they have given a formula


key=(sum of small digits)-(sum of large digits)

soo the expected output is


OUTPUT:
-17

Problem-2
I have given two inputs one is integer and another is string
input1 is the length of the array of input2

input1:3
input2:{ace,oppo,gen}

if the first letter and last letter of the input2 word is vowels then we need to combine the those
words and print that one
OUTPUT:
aceoppo
Problem - 1:

Statement : Given input 3 numbers of four digits.Genarte the key with the 3 numbers by following the
instructions given below:

key = [sum of highest digits of each number] - [sum of smallest digits of each number]

input : 3911 2123 5236

output : 14

Explanation:
key = [9+3+6] - [1+1+2] = 14

Problem - 2:

Statement :
Write a program that takes a sentence as input and increments each character in every word by the
length of that word.
The result should be a transformed sentence where each character in a word has been incremented
by the total number of characters in that word.

Requirements:
The input will be a single sentence containing multiple words separated by spaces.
Each word's characters should be incremented by the length of that word.
The output should be a single transformed sentence.

Sure! Here’s a problem statement based on your request:

Problem Statement
Write a program that takes a sentence as input and increments each character in every word by the
length of that word. The result should be a transformed sentence where each character in a word has
been incremented by the total number of characters in that word.

Requirements:
The input will be a single sentence containing multiple words separated by spaces.
Each word's characters should be incremented by the length of that word.
The output should be a single transformed sentence.

Input: hello world


Output: mjqqt btsqi

Explanation:
"hello" has 5 characters, so each character is incremented by 5:
'h' becomes 'm'
'e' becomes 'j'
'l' becomes 'q'
'l' becomes 'q'
'o' becomes 't'
"world" has 5 characters, so each character is incremented by 5:
'w' becomes 'b'
'o' becomes 't'
'r' becomes 's'
'l' becomes 'q'
'd' becomes 'i'
PROBLEM 1:
THEY HAVE GIVEN THREE INTEGER INPUTS LIKE INPUT1 ,2,3
AND THEY ASKED TO DRAW THE KEY VALUE UDING THREE INPUTS
AND THE FORMULA FOR THE KEY IS:(100th place of INPUT1 *10 th place ofINPUT2)-largest digit
ofINPUT3.
LOGIC:
while(input1!=0)
{
int h=input/100;
h=h%10;
}
while(input2!=0)
{
int t=input2/10;
t=t%10;
}
while(input3!=0)
{
int max=0;
int d=input3%10;
if(d>max)
{
max=d;
}
}
int key=h*t-max;
return key;
--------------------------------------------------------------------------------
PROBLEM 2:
THEY GIVEN A STRING AND ASKED TO RETRIEVE THE VOWEL COUNT
SOLUTION:
I converted the string to lowercase and check for the vowels in the string and increment the count
str=str.LowerCase()
for(i=0;i<str.length;i++)
{
if(str.charAt(i)==a,and so on..)
count++;
}
}

problem :1

You are provided with 3 numbers input1,input2,input3.


Each of these are four digit numbers within the range >=1000 and <=9999
i.e
1000<=input1<=9999
1000<=input2<=9999
1000<=input3<=9999
You are expected to find the Key using the below fo

Key = [LARGEST digit in the thousands place of all th numbers - smallest digit in the thousands place of
al numbers] [LARGEST digit in the hundreds place of al numbers - smallest digit in the hundreds place
of all numbers] [LARGEST digit in the tens place of all three smallest digit in the tens place of all three
numbers] [ digit in the units place of all three numbers - smallest units place of all three numbers]

For e..g.

if input1 = 3521, input2=2452, input3=1352, then Key = [3-1] [5-3] [5-2] [2-1] = 2231

Assuming that the 3 numbers are passed to the given f

Complete the function to find and return the Key.

problem :2

you are provided the words we need to find out the how many vilowes are presented and how many
non volies are presented in we need to display in it .
fro examples:
Wipro
output:
there are 2 violews are presented in it [i and 0].
Problem-1

Given three inputs and we need find out the key value of four digits number calculate the four digit
key for the first digit is calculated as minimum number from the three digits mod of the 1000 and the
second digit is minimum of the three digits mod 100 and the third digit is minimum of the three digits
mod 10 and the fourth digit is the minimum of the three digits divided by 10 and we get four digits
calculate the key is sum of the first digit multiply with thousand and the second digit multiply with
hundred and third digit multiply with 10 and fourth digit.
Problem-2

Given two strings find the uncommon characters from these strings add the ascii values of these
characters if the value is greater than 10 again reduce it to between 0-9 and print the output if no
uncommon characters are there return -1
--------------------------------------------------------
Problem-1
Given 3 inputs
identify highest 1000 place,identify highest 100 place,highest 10 place,highest units place among
three inputs?
After identifying the those numbers we have print that 4 numbes
Input:
input1:1234,input2:2345,input3:3710
output:3745

Problem-2
Given input string
We have identy vowels in that string and print the count of the vowels of that string?

input:Wipro

output:2
PROBLEM STATEMENT 1:
You are provided with 3 numbers: input1, input2 and input3.
Each of these are four digit numbers within the range >= 1000 and <=9999. i.e. 1000 <= input1 <=
9999
1000 <= input2 <= 9999
1000 <= input3 <= 9999
You are expected to find the Key using the below formula - Key = (Thousands digit of input1 x
Hundreds digit of input2) - (Largest digit of input3)
For e..g. if input1 = 3521, input2=2452, input3=1352, then Key = (3 x 4) -5=7
Assuming that the 3 numbers are passed to the given function.

PROBLEM STATEMENT 2:
You are provided 2 character arrays.
find the unique ones among them and then convert those characters into ascii values.
if only one unique character then sum the digits of that ascii value till we obtain sum as single digit e.g.
A=65=6+5=11=1+1=2.
if many characters then sum all ascii values then digits sum till we obtain sum as single digit e.g.
{A,B}=65+66=131=1+3+1=5.
example: input1={A,B,C}
input2={C}
output: 5
problem 1:
int input1=1234,input2=1321,input3=2512
find the smallest digit in ones place, tens place, hundreds place, and thousands place
key=1211
return the value as an integer num

problem 2:
strings input1,input2
find input 1 is in increasing or decreasing order based on ascii values
the input2 has same letters which are in the input1 now compare both inputs to find the how many
char are misplaced in the second input
output: increasing:2
Question 1.
given three input numbers as input1,input2,input3.find out the max digit value from the three inputs
and min digit
from the three input input.Find out the sum of min digit and min digit and return the difference
between both
of them.
output:
1234,5678,9102
(4+8+9)-(1+5+0)
=21-6
=15
Question 2:
given two input strings as input1 and input 2 .concate the two strings where the concate string must
and start
and vowelwith vowel and end the vowel.The resutlant string must and should strart with vowel and
end vowel.
output:
input1,input2=apple,eagle
resultant=appleagle
Problem 1:
given 3 inputs from that inputs take sum of largest digit number and sum of smallest digit number and
then find difference between sum of largest number and smallest number.
input:
3245
2456
1234
output:
(5+6+4)-(2+2+1)=10

Problem 2:
Given two input strings from the two strings we have to find increasing value based on ASCII values
input:
Adcb
dAcd
output:
increasing string 56

----------------------------------------------------------
Problem 1:
Given a three integer inputs. Identify max and min elements from the given input, and add sum of
max values from given three inputs and sum of the all min values from the given three inputs. Finally
subtract the sum of the max and sum of the min.
Ex:
input1=1234
input2=3456
input=5789
max1=4;
max2=6;
max3=9;
min1=1;
min2=3;
min3=5;
max sum=4+6+9=19
min sum=9
key=max-min;
19-9=10
Problem 2:
given two inputs one is integer and another one is string array. Integer input represents the size of the
string array, here we check the first and last character of each word is vowel or not.If both are not
vowel return "no matches found".,if any matches found concatenate both strings.
Ex:
input1=3
String arr[]={"one","apple","hello"};
from above input "one" and "apple" are satisfied with our condition so concatenate both of them
output:oneapple

-----------------------------------------
problem 1

Description of the problem

1 Given three numbers are 4532,4256,1234 we had to find out the thousands place, hundreds
place ,tens place, units place
and subtract the thousand place of three numbers, tens place, units place and return the final four
digit number
sample test cases are :
1234,
4256,
4532
2

2 given two strings cases as input find whether the string1 is increased or decreased based on ascii
value
sample test cases are:
1.ACZa
2.CAZa

output as increased 2
1)write a program to print the 10's digit from the first input and 100's digit from the second input.
And then add the first input and second input. To take the largest number from the third number.
multiply the third input to the first two inputs sum.
input1:1233
input2:2134
input3:4566

Output:24

2)given two strings input1 and input2 consisting of random alphabets find whether all the alphabets
in input1 are in either increasing and decresing order based on their ascii value

input1:ACZa
input2:CAZa

Problem1:
Given three inputs input1,input2,input3 print the max elements from the thousands
position,hundred position,tens position and ones position and return the number.
Sample Input:
5678
3592
9062
Sample Output:
9698
Problem 2:
Take two strings as input extract the alphabets which are present only in any one of the arrays and
then remove the common alphebets and get ascii values of the extracted alphebets and calculate the
single digit sum and print the single digit as the output.
Sample Input:
{'A','B','C'}
{'B','C'}
Sample Output:
2
Problem 1:
Three inputs are given
(Thousands digit of input1 x Hundreds digit of input)-(Largest digit of input3)
input= 13521, input2=2452, input3=1352,
3x40-52
output= 7

problem 2:
Strings based
When the String contains characters whose asos value is prime
input1= WIPRO
output 10:152
The ascii value of WT/PR and O' are 87.73.80.82 and 79 respectively Out of which 73 and 79 are
prime where 1 and O are the character equivalent of the prime asci values and 152 is the sum of the
prime asci values

input2= Fia8820101
output= 30:176
Problem1

1.Finding the max and min digits sum from All the inputs given and return Difference between them.

input1:5346 input2:2345

output:6

explaination:(6+5) - (3+2)

2.Finding whether words in the string follows the increasing order or not based on the ascii
words.(case sensitive)

input1: ABHi IS A Good Boy;

Output:5

input2:: hELLO Sam

output:1
Problem-1:Generate a key using three inputs input1,input2 and input3.
Find thousands digit of input1,hundreds digit of input2 and maximum digit of input3.
Key=(Thousands digit of inout1*Hundreds digit of input2)-Maximum digit of input3
Input1=3521,input2=2452,input3=1352
Output:7
-------------------------------------------------------------------------------------
Problem2:Return the count of vowels in a given word.
Input:TeChnolOgiEs
Output:5
Problem-1:
Generate a key using three inputs in that inputs we need to print the largest digit in the thousands
place of all the three numbers and largest digit in the hundreds place of all three numbers and largest
digit in the tens place of all three numbers and
largest digit in the units place of all three numbers
For Eg:
if input1=3521,input2=2452,input3=1352,then key=[3][5][5][2]=3552

-------------------------------------------------------------------------------------------------
Problem-2:

We have to write a program that should accept a word and count the no of vowels present in that
word
Eg:
Input:Wipro
Output:it should return value 2

PROBLEM 1:
Will be provided with 3 inputs, the output should be in below manner.
output = (Tens digit(input1)) * (Hundreds digit(input2)) - (Highest digit(input3))

PROBLEM 2:
A string is provided, we need to generate a output in following manner.
EXAMPLE: string="WIPRO"
The characters with even ascii values must be combined into a string and their ascii value must be
added and the output format is (String formed from even ascii values) : (Sum of ascii values)
Problem 1 :

Given 3 inputs calculate the sum of smallest digit of all three inputs and sum of largest digit of all
three inputs and finally subtract the total sum of smallest digits and total sum of largest digits.

Example :

if the given inputs are


input1 : 1236
input2 : 546
input3 : 7851

The smallest digits are :


input1 : 1
input2 : 4
input3 : 1
Total sum of smallest digits are : 6

The largest digits are :


input1 : 6
input2 : 6
input3 : 8
Total sum of largest digits are : 20

Subtraction of total sum of smallest digits and largest digits are : -14

Problem 2:
Given 2 inputs arrays identify the non repeating number in the two arrays and calculate sum of non
repeating numbers in the two arrays. Finally calculate the sum of digits of the result of the sum of non
repeating numbers until we get the single digit.

Example :

if the given two inputs arrays are


input1 : 12 1 89 46 2 3
input2 : 89 46 4 5 12

non repeating numbers of two arrays : 1 2 3 4 5

sum of non repeating numbers : 15

sum of digits : 1+5=6

calculate sum of digits until we reach the single digit.


Problem-1:

we have provided 3 inputs,in each input we extract the minimum value and maximum value,after
that we return the sum of minimum values and maximum values then after we find difference of sum
of minimum values and maximum values.
formula:key=(sum of smallest digits)-(sum of largest digits)
Example:2135,4532,6734
explanation:(1+2+3)-(5+5+7)

problem-2:

We have provided with 2 strings. We have to check whether the strings are either in ascending
order or descending order based on the ascii values. If the the strings are neither in ascending or
descending order we have to return Invalid as the output.
Example:input1:ACZa
input2:CAZa
Output:increasing:2
increasing:2
Problem-1:
We have provided with three inputs.In every input we have to extract the minimum value and
maximum value and at the end we have to return the sum of the minimum values - sum of the
maximum values.
Example - 1234,5643,5657
Explanation-(1+3+5)-(4+6+7)

Problem-2:
We have provided with two strings. We have to check whether the strings are either in ascending
order or descending order based on the ascii values. If the the strings are neither in ascending nor
descending order we have to return Invalid as the output.
Example -input1 ACZa
input2 CAZa
output Increasing:2
MileStone-1 Logic Building

Problem-1: Return the Key

Given three inputs with four digits in each. Now from the three inputs we need to find the
Max of units place from the three inputs, Max of tens place, Max of hundreds place and Max
of Thousands place. Now we need to generate a key with the above four numbers i.e., Units
place should be the max of three inputs, Tens place should be the max of three inputs as
well as the hundreds place and thousands place should be the max of them respectively.

Sample Test case:


input1: 3562
input2: 7892
input3: 1239

Output: 7899
Max of Units place: 9
Max of Tens place: 9
Max of Hundreds place: 8
Max of thousands place: 7

Problem-2: Return Increasing or Decreasing with the misplaced values

Given two strings, both the strings have the same length and both of them having the same
digits or alphabets in it but some of them are misplaced when compare with the input1.

input1: Aach
input2: Acha

Now we need to take the input1 and we need to check that the input1 is in the increasing or
decreasing order with the help of ascii values. If the input1 is in the increasing or decre
-asing order the we need to check that how many digits are misplaced with the input2, then
we need to return the increasing or decreasing with the count of misplaced digits when we
compared to input2. If the input1 is not in increasing or decreasing order then we need to
return that it is "Invalid".

Sample Test case-1:


input1: Aach
input2: Acha

Output: Increasing:3

Sample Test case-2:


input1: Abaa
input2: Aaba

Output: Invalid
Problem 1:

Given 3 inputs we should take 1st input thousand place 2nd input hundred place and 3rd input
smallest digit in that input we should add that thousand place ,hundred place and smallest digit
key=thousand place+ hundred place + smallest digit
testcases:
input1=2345
input2=2378
input31234
key=2+3+1=6
output=5
problem 2:
Given a set of words asked to find count of ordered words that ordered word is in the increasing
order according to their ascii value if their is no ordered words return 0 if the function accepts string
and return an int
testcases:
input1=accept Van
output=2
input1=World
output=0

Problem - 1 :

Given 3 numbers range 1000-9999.We have to find max and min digits in three numbers and print
sum(all min digits)-sum(all max digits).
Example:
Input-- 3 inputs are 1234,4567,8765
output-- (1+4+5)-(4+7+8)=10-19=-9

Problem - 2 :

Given 2 arrays.we have to iteratively find the sum of uncommon numbers in two arrays until single
digit.
Example:
Input-- 2 arrays are {1,2,3,4,5,6} and {1,4,6,8,9}
Output-- 2+3+5+8+9=27
2+7=9
Here 9 is the output.
Question-1
------------
Vowels Count

input1 as string

check that how many vowels are there in that input1

then increase the count value of vowels in that input1

finally return the count of vowels

Question-2
---------------
find the key

given 3 inputs
input1 thousand digits find the units place
input2 hundred digits find the units place
input2 find the smallest digit

we have to find the key using the formula they have given

key=(thousandsdigitinput1*hundreddigitinput2)+smallestdigit

we have to compute the function to find and return the key

ex: inpu1=3521 input2=2452 input3=1352


key=(3*4)+1
problem-1
given 3 inputs
thousands place digit of input1,input2,input3(max of this three digits(th))
hundreds place digit of input1,input2,input3(max of this three digits(h))
tens place digit of input1,input2,input3(max of this three digits(t))
units place digit of input1,input2,input3(max of this three digits(u))
key=th*1000+h*100+t*10+u
return key
problem-2
given 1 input(String)
we have to find the Ascii value of each alphabet in the string
ex:AB
for A
6+5=11
==>1+1=2
for B
6+6=12
==>1+2=3
2+3
return 5(single digit)
Problem 1:
Find The Sum - Uncommon Alphabets - Uppercase
step1:extract the alphabets which present in array
step2:get ascii values pf all extracted alphabets
step 3-calculate sum of ascii values
single digit for sum1
step 4-return single digit as o/p
-->array size from 1-15
-->all array elements upper case
inp1:{'G','Q','R'}
inp2:{'R','T','U'}
o/p:71+81+84+85=321->3+2+1=6

problem2:
three inputs as inp1,inp2,inp3
each of four digit number within range >=1000and <=9999
1000<=inp1<=9999
1000<=inp2<=9999
1000<=inp3<=9999
Key(hundreds digit of inp1xTens digit of inp2)-(largest digit of inpu)
F eg. if inp1=3521,inp2=2452,inp3=1352,then Key=(5x5)-5-20

Problem 1:
Given three inputs,from that three inputs we have to find the minimum digits and maximum digits
and then we have to sum those minimum digits and maximum digits, then for final result we have to
return (minimum sum) - (maximum sum)

INPUT :
input1 = 123
input2 = 431
input3 = 987
OUTPUT:
-7

Explanation:
(1+1+7)-(3+4+9)

Problem 2:
We should return the modified sentence of the given string.

INPUT : Hi Hell

OUTPUT: Jk Lipp

Explanation:

*Hi is shifted 2 times forward as the length of Hi is 2.


*Hell are shifted 4 times forward as the length of Hell is 4.
*If the alphabet reaches the end of the series, then it should be replaced with z or Z.
QUESTION-1
Given input is a string if the string length doesn't exceed "10" print the same string
-->if string length exceeds 10 then print the first letter and the last letters in between them the count
remaining string in the middle should be print
example:
INPUT:LOCALIZATION
OUTPUT:L10N

QUESTION-2
If the input is the set of strings the print the largest numbers among thousands,hundreds and tens
example
INPUT:1234,4567,5648,7899
OUTPUT:[7][8][9][9]
problem 1:Take four numbers(1000<=numbers<=9999) and find max and min value in each number
and return the difference between sum of min values and sum of max values.

input:5231,2345,1243,2365
output:-14

Explanation: smallest number from first Number:1 Biggest of 1st number:5


smallest number from second Number:2 Biggest of 2nd number:5
smallest number from third Number:1 Biggest of 3rd number:4
smallest number from four Number:2 Biggest of 4th number:6

sum of all small numbers:6 sum of big numbers:20


difference=-14

problem 2: Given two inputs where first array is array of numbers and second input is a number . find
the prime number of given number(input2) and add it to the elements of the array.

input: {3,4,5},2
output:{6,7,8}
Explanation: find the nth prime number of the given output and add to the array.
problem-1:Generate a key using three inputs as input1,input2,input3. Now generate the key as (sum
of maximum digits among the three inputs )- (sum of the minimum digits among the three inputs).
Input format:3125,4136,6548
Expected output:13

---------------------------------------------------------------------------------

Problem-2:Given a String if the string count is less than 10 print string otherwise retrun a special case
as return the fistletter of the string folloed by it's count followed by last letter of the string.
Input format:Engineering
Expected output:e9g
1.
take 3 inputs

output:
(thousand place digit of input1)*(hundred place digit of 2nd input)-max digit of input3

TestCase:
input1:3421
input2:1542
input3:8765
output:(3)*(5)-8 =7

2.
uncommon numbers in two arrays

input: Two arrays

TestCase:
a1=[1,5,6,7,8]
a2=[2,4,5,6,7]
output:
[1,8,2,4]
Because 5,6,7 are common elements in two arrays
1. Return Key

Given three inputs find out maximum and minimum digits in each of those three inputs.
And sum up the maximum and minimum digits of three inputs.
Return difference of MaxSum and MinSum.
Example : input1 : 1245
input2 : 9123
input2 : 7423
Output : (5+9+7) - (1+1+2) = 17

2. Find modified String

Given one input string based on the condition we have to modify the string.
Each word in the string should be modified according to its length.

Example : input : Hi hell


Output : Jk Lipp
Explanation : The size of string except the spaces is 2 so characters in Hi added individually with two
resulting the string Jk. The length of Hell is 4 adding 4 to its result Lipp.
Example : input : ABCDX
Output : FGHIZ
Explanation : The last character is X if we add 5(the length of string) it would not cross the 'Z' or 'z'
and if crosses it should print 'z' or 'Z' only.

Note : The output string should return the same cases as the input has, if it is upper then modified
string also needed to be upper.
1.given 3 inputs each of 4 digit. find thousands digit of input1,hundreds digit of input2 and min digit of
input3 then return (inpu1*input2)+input3;
input1=(input1/1000)%100;
input2=(input2/100)%10;
while loop to find min element.

2.Write a Java program that takes two input strings from the user (input1 and input2) and checks
whether the characters of input1 appear in input2 in either strictly increasing or strictly decreasing
order based on their indices in input2. If the characters do not appear in such an order or if any
character in input1 is not present in input2, the program should return "Invalid". If the characters
appear in an increasing order, it should return "Increasing
", and if in a decreasing order, it should return "Decreasing
", where n is the number of comparisons made (which is length of input1 - 1).

find the ascii values of the given inputs and then check for the elements of input1 present in input2 or
not. If not present return invalid else check increasing or decreasing order and comparisons.
1)given three numbers as inputs.we need to find the thousand,hundred,tens,units place in the three
inputs and then we need to find the max number in the three numbers thousand places and minimum
number of the thousand places like wise we need to find same in the hundred,tens,unit places.After
that we want to subtract the max-min values of thousands,hundreds,tens,units.Then print the
thousand,hundred,tens,units value in the same line.
3521
2452
1352
output:2231

2)Take two strings as input extract the alphabets which are present only in any one of the arrays and
then remove the common alphebets and get ascii values of the extracted alphebets and calculate the
single digit sum and print the single digit as the output.
Sample Input:
{'A','B','C'}
{'B','C'}
Sample Output:
2
Problem-1
Given three inputs lets say input1=(145),input2=(254),input3=(453) to generate a key
we should find maximum numbers in three inputs and minimum numbers in three inputs and add
maximum and minimum numbers
Input:
input1=(145),input2=(254),input3=(453)
Output:
Max=5+5+5
Min=1+2+3
Key=21

Problem-2
To Identify the Uncommon digits in the given inputs and add then until the output forms an single
digit number
Input:
input1=(1,67,89,7)
input2=(2,7,5,5)
Output:
1+67+89+2=159
1+5+9=15
1+5=6
Output=6
Problem-1

Given three inputs input1,input2,input3

We should return
----------------------
(sum of max of all the given inputs individually)-(sum of min of all the given inputs individually)

Ex-

2345,5635,3748

(5+6+8)-(2+3+3)

return 11

---------------------------------------------------------------------------

Problem-2-->Prime Encoder

Given two inputs input1[],input2

input1 is an array

input2 is an integer

Input2 th prime number should be added to the each digit in input1

Ex-

input1----[1,2,3]

input2-----2

2nd prime number is 3

[1+3,2+3,3+3]

return [4,5,6]

Ex-
input1-----[4,2,1]

input2----4

4th prime number is 7


[4+7,2+7,1+7]

return [11,9,8]
Problem-1:
----------
Given three inputs input1,input2,input3.Each of these inputs contains four digits.
we have to generate key using these three inputs by using the formula
key=(Thousands digit in input1)*(Hundred digit in input2)-(minimum digit in input3)

Sample input:
------------
1234 , 7890 , 8096

Sample output:
-------------
8

===================================================================================
====================================================

Problem-2:
-----------

Given a String contains both uppercase and lowercase letters.convert them into case-insensitive and
find the number of vowels in a given string.

Sample input:
------------
Language

Sample output:
-------------
4

problem-1:
They had given three inputs.
output=(hundereds digit from input1)*(tens digit vrom input2)*(max digit in input3)
eg:123 234 345
output=1*3*5=15

problem-2:extract the string which has vowel as the first and last character from the
given array of string and concate them

eg:["oreo","sree","apple"]
output=oreoapple
problem1: Find a key
Given 3 inputs
>first hundredsplace of input1
>second tensplace of input2
>third largest digit of input3
key=(hundredspplace of input1 * tensplace of input2)-largest digit of input3
return key
example:
input1:195
input2:435
input3:897
return 6

Problem2:Nth Prime Array


Given one input and one array
>first need to find nth prime after finding the nth prime the value should be added to
array values then return the array

example:n=5,a={4,5,3}
Nth prime of 5 is 11 then 11 should be added to the array values
output should be {15,16,14}
Problem1:

They are Given Three inputs.

1.Take the thousands digit in first input

2.Take the hundred digit in second input

3.Take the smallest digit in third input

let's find a Key based on the above requirements:

key=(input1*input2)+input3

Inputs:
2345,1376,4235

Output:

key=(2*3)+2
=8

------------------------------------------------------------
Problem 2:

They are given two strings:

1.Take the first string and checks the every character is

in the order of either Ascending or Descending.

2.The first string is not in the order of either Ascending or Descending.

Then it will return "Invalid"

3.otherwise, compare the both strings it will must be same size of strings and

same characters in the two strings in different places.

4.checks the every character by the index based on two strings and

find the count of misplaces of character.


Inputs:

input1=ACak
input2=CAak

Output:
increasing:2

Inputs:
input1=bcBC
input2=BbcC

Output:
decreasing:3

Inputs:

input1=lkdkmkc
input2=lkdkkmc

Output:
Invalid
Problem-1(Number Based Problem)
You are given with the 3 4digit numbers ranges from 1000 to 9999 have to get the hundred place
number from the first number , tens place of the second number and the biggest number from the
third number. Produce the Multiple of the three numbers.

Sample Test: 5286,4356,3341


Output: (2*5)*4 = 40

---------------------------------------------------------------------------------------------------------------------------------------
-----

Porblem-2(String Based)
You are provided with a string of CASE Sensitive the output should be of the no of Vowels present in
the given String and print the count of the no of vowels present in the string

Sample Test: Reached


Output:3
PROBLEM - 1
__________________

Take 3 inputs each of these are four digit numbers


generate key
1)largest digit in the thousand place-smallest digit in the thousand place
2)'' '' '' hundred place - '' '' '' '' hundred ''
3)'' '' '' TENS '' - '' '' '' ''tens ''
4)'' '' '' units '' - '' '' '' '' units ''
input:3521 2452 1354
output: 2231

___________________________________________________________________________________
_

PROBLEM-2
2 strings input1,input2
whether the alphabets are increasing or decreasing order based on the Ascii value

input1:ACZa
input2:CAZa
output:increasing:2
LOGIC_BUILDING PROBLEM 1:
The problem consists of three inputs (input1,input2,input3) where each input is >1000 and <9999.
The given inputs are four digit numbers.First we have to calculate the maximum digit in thousands
place out of three inputs,next maximum digit in hundreads place,tens place and units place.Next we
have to calculate the minimum digit in thousands place out of three inputs,minimum digit in
hundreads place,tens place and units place.
Now find the difference between maximum of thousands digit and ,minimum of thousands digit(do
the same for hundreads,tens and units digit)

SAMPLE INPUT:
4567,6348,9220:
SAMPLE OUTPUT:
5348
LOGIC--(9-4,5-2,6-2,8-0)

LOGIC_BUILDING PROBLEM 2:
Given two inputs one is input1,and another is input2.input1 is an array consists of numbers.input2 is
an number.We should calculate the nth prime for input2 and add it to each input1 array numbers and
return the output array.
given that prime series 2,3,5,7,11 so on...zero and one are not prime nor composite.
if the input2 is 3 then we have to calculate the 3rd prime number which results 5
if the input2 is 5 then we have to calculate the 5th prime number which results 11

SAMPLE INPUT:
INPUT1-[7,8,9]
INPUT2-5(find 5th prime number i.e,11)

OUTPUT:
[18,19,20]
problem 1:
you are guven 3 integers. each integer consists of four digits. find the maximum and minimum of each
integer and add all the maximum and minimum numbers.now subtract the maximum count and
minimum count
input1: 1234
input2 : 2345
input3 : 8964

maximum=4+5+9=18
minimum = 1+2+4=7
output : 18-7= 11

problem 2:
you are given a word and you need to find out the vowels count of that word.
input: wipro
output :2(i,0 are vowels)
input: car
output : 1(a is vowel)
Problem-1
read the input1,input2,input3 hundredplace from input1, tenthplace in input2, max digit from input3
and perform the operation (hundred digit*tenth digit)-max;

input:
input1= 2346
input2=5738
input3=5863
output:
(3*3)-8=1
---------------------------------------------------------------------------------------------------------

Problem-2
prime encoder

read input1 and input2;


prime numbers=2,3,5,7,11
intput2 read position of prime numbers
add the prime number to the input1

input:
input1=a[1,2,3,4]
input2=3

output:
[1+5,2+5,3+5,4+5]

Problem1:
Generate the pin in the following format

input1=2345 input2=3456 input3=1256

[max of thousand's place - min of thousand's place][max of 100th place - min of 100th place][max of
tenths place - min of tenths place][max of unit's place - min of units place]
[3-1][4-2][5-4][6-5]=2211
output:2211

problem 2:

find the number of vowels in the given word and return the count

input1: wipro Technology


output :return 5

problems I faced :

1) there will be 3 inputs given you need to multiply the 100th place of input1 and 10 place of input2 ,
and substitute the max element of input3 from that

1234
2345
3456

sample output : (2*4)-6


2) there will be string given with no of words in it . you need to identify the no of words that follow
the ascending order and increment the count and need to return it.

accept Van

sample output : 2

tough i was able to solve the 2 problems , i invested so much time in solving the 2 question . i need to
learn the methods and functions to use strings in a very simpler manner
Problem-1
case1:when string contains characters if its ascii value is prime
then
INPUT1:
WIPRO
OUTPUT:
IO:152
case 2:when string does not contains characters whose ascii value is prime
INPUT:
CUP
OUTPUT:
C:P
*****************************************************************************
Problem-2
we have to find [smallest digit in the thousands place]*[smallest digit in the hundreds
place]*[smallest digit in the tens place]*[smallest digit in the ones place]
PROBLEM 1:

Given three inputs input1,input2,inpu3 and we should return the 1000 place of first input and 100
place of second input and we find the max num in third input.

input1*input2- max(input3)
ex:
input1: 3300 input2: 2300 input3: 1234

output: (3*3)-4

PROBLEM 2:
Given 2 char array inputs, input1[] input2 []. we should return the sum of the uncommon alphabet
according to ther ascii number

input1: {'A' 'B' 'C'}


input2: {'B' 'C'}
output: ascii of A is 65 = 6+5
= 11 = 1 + 1 = 2
Problem-1
Given 3 input numbers
the (largest numbers from 3 inputs sum)+(smallest numbers from 3 inputs sum) is the output

Problem-2
Given two strings
the strings contains captial and small letters
so the output is to return the vowelcount in the given string

Problem-1:
Given three inputs input1,input2,input3
we have to multiply and return the hundred digit of first input and tenth digit of second input
and maximum digit of third input.
sample input:
156
123
457
sample output:1*2*7=14
we have to return the output.

Problem-2:
String base problem

Given an input
we have print the first character,last character and count of characters in between first and last
character.
sample input:morning
sample output:m5g
Problem 1:

the first question is given with three four digit numbers it is said that we have to find the max and min
for one's, ten's, hundred's and thousand's places and have to subtract max and min values of defined
places to form a key with the subtracted values as place values respective to their places

Problem 2:

the second question is given with three strings and have to identify strings with start and ends as
vowels and concatenate the strings the with consideration of condition and output must be all small
alphabets
problem 1:-
Extract string from array which has starting and ending letter is vowel

problem 2:-
given 3 inputs
input1,input2,input33
each input is a four digit number in the range >=1000 and <=9999

problem1:we have to take 3 inputs


from the first input takes one's place
from the second input we have to take ten's place
and from the third input we have to take the maximum of that input
then after multiply all the three inputs
Sample output:
input1:234-one's place-4
input2:987-ten's place-8
input3:346-maximum number-6
multiply all above inputs:4*8*6=192

Problem 2:from strings concept


for example they given a string and we have to replace the string with another characters
Sample input:EXam Time
Sample output:IBeq Xmqi
LOGIC BUILDING(Mile Stone-1)

PROBLEM-1(Number Based Problem)


You are given 3 integers(input1,input2,input3) each of the number with four digits. Take each number
one by one and find out the maximum and minimum digits in that number. After this step you will
have 3 maximum digits and 3 minimum digits, then you need to return the (sum of minimum digits-
sum of minimum digits).

Sample Test Case


input1=1345
input2=3487
input3=6510

Output=(1+3+0)-(5+8+6)
Output=-15

------------------------------------------------------------------------------

PROBLEM-2(String Based)
You are given a string , if its length is less than 10 return the same string ,otherwise return 1st
character of string and length of the string except 1st and last digits and last character of the string.

Sample Test Case

input1="Hello"
Output=Hello

input2="HelloMylavaram"
output=H12m
Problem 1:
Write a program to take the three inputs ,from that three inputs take the 100's place element
from the input1,take the 10's place element from the second element and take largest digit from the
third input.
calculate the given formula
res=100's place element *10's place element-largestdigt.

Problem 2:
Write a program to take the input as String and Convert into Ascii values check the ascii values of the
string. if the string follows the ascending order.if string follows the ascending values return 1,not
follows return 0.

Problem-1:
-------------------
Find the key:
Give three inputs and asked to find a key by using subtracting minimum number from the maximum
number from the given three inputs with the help of three inputs
here we have to find the maximum and minimum number from the given each input and subtracting
the minimum number from the maximum digit and add them by using the
formula.

Sample test case:


---------------------
[2983][2456]9845]
output: 40

Problem-2:
----------------
return the modified statement:
this problem is based on the strings here they have given an input1 and the given string should be
shifted according to its length

Sample test case:


"HI Hell"
output: JK LIpp
program 1 :- write a program for the given three inputs calculate the max element in one's place,
ten's place, hundred's place, thousand's place of three number and create a new number.

input : -
1234
4321
2314
1324
output:-
4334

program 2 : - write a program for a given string calculate the length of the given string if the length is
less than 10 then return the word, other wise count the length of the letter in the word by removing
the first and last character and join the first character , count of the characters in the string, last
character

input : -
Balamahanthyakkala
mahanth
output : -
B16a
mahanth

Problem 1:

Given three integer inputs named input1,input2,input3;


the need to print the the result
where
result=(Hundred's digit of the input1 * Tens digit of the input2)-(Maximum digit of input3);
testcases:
1)input1=1234
input2=1345
input3=7654
output=(2*4)-7=1
2)input1=2345
input2=5678
input3=2345
output=(3*7)-5=16

Problem 2:

Given two set of Char arrays input1,input2


we have to find the uncommon characters of two arrays;
need to sum of value those character sequence where A=1;
all the characters are Uppercase letters.
testcases:
1)input1={'A','B','C','D'}
input2={'B','C','F','G'}
output=1+4+6+7=18=9;
where B,C are common characters
A=1,D=4,F=6,G=7
1+4+6+7=18
1+8=9;
Problem-1 : i have got problem statement on vowel count of a given string
they have given an input of string. we have count the number of vowels in that string and return the
count
Sample input 1 : INTELLIGENCE
Sample output : 5
--------------------------------------------------------------------------------------------------------
Problem-2:Given two inputs have one input is integer and next inputs has string array to find each
string in array first and last character have oval then return to print that string has add to final output
to convert lower case
input1=3;
input2={"afhaf","ojhksa","akjdha");
output=ojhksaakjdha
Problem-1
Given 3 inputs,each are of 4 digit nos;
_find the result using the below formula
[smallestdigits in thousands place][smallest digits in hundreds place][smallestdigit in tens
place][smallest digit in units place]
ip: 3521,2452,1352
op:[1][3][2][1]

Problem-2
given two arrays with inputs;
_finding the elements which are only present in one array and sum them as sum1
_sum the digits of sum1 until the sum getting below 10
ip: arr1:123,45,7890,67,2,90
arr2:7890,45,123
op: 67+2+90=159
1+5+9<10False
5+9<10False
1+5<10 true
Problem1:
Get the logic for the function which will take as 3 inputs and it should return a number which will be
the subtraction of max and min digits of all 3 inputs.
sample test case:
inputs:
1234
2345
5678
output:
9
Explanation:
max of inputs:4,5,8
min of inputs:1,2,5
(4+5+8)-(1+2+5)=9
Problem2:
Get the logic for the function will take two inputs one id integer array and another one is integer.
According to the integer value(input2) get the index value of prime number i.e
index prime number
1 2
2 3
3 5
. .
. .
and add this indexed prime number to the array and return the array.
sample test case:
inputs:
{1,2,3}
2
outputs:
{4,5,6}
Explanation:
2 indexed prime number is 3.so,{1+3=4,2+3=5,3+3=6}={4,5,6}
problem 1:
3 inputs were given like input 1,input2,input 3 which are limited from 1000 to 9999.
the question is described as we have to print the key ie the largest number of given 3 and the
smallest of the three ie thousands, same as for the hundreds and then tens and ones.
------
problem 2:

2 inputs were given as arrays from which we have to extract the uncommon numbers and make the
sum of it in such a way that single digit number is formed.
Question 1:

Given three inputs named input1,input2,input3.We need to return by using the following formula
(input1(thousands digit) * input2(hundreds digit) - Max(input3)).

Example -

6234
2562
3623

sample implementation

sum = (6*5)-6

return sum

Question 2:

Given two inputs with characters.You need to extract the single digit sum of the alphabets that is in
another words given a character based on the ASCII value of the character you need to add the sum
and the total sum of the digits obtained in the sum.

Example :

input1:{'X','A','C'}
input2:{'D','E','F'}

now add the ASCII values of the alphabets and say for example we have received an sum for input1
like 35 for input2 63 then the sum of 35+63=98 and now 9+8=17 and 1+7=8 is the result you need to
return.
Problem1-
You will be given three input numbers containing 4 digit numbers input1,input2,input3. Now you have
to find the maximum of each input digits place and using these digits you have to form a pin.
Ex:-3456,6789,1231
i. Now extract maximum value of thousand's digit place in three numbers i.e 6
ii. Extract maximum value of hundred's digit place in three numbers i.e 7
iii. Extract maximum value of ten's digit place in three numbers i.e 8
iv. Extract maximum value of unit's digit place in three numbers i.e 9

So the pin formed is 6789

Testcase1: 6734,9812,5432
output: 9834

Problem2:-
You will be given a String consists of both uppercase and lowercase letters. Now you have to find the
vowels count in that string.
Note: Both a,e,i,o,u and A,E,I,O,U will be included in that String

Ex:Input- applE
output- 2
Testcase1: islAnd
Output: 2
Problem-1:

Given three inputs then find each input has max and min values taken after three inputs are
completed total(min) and total(max) value sum
input1=2345;
input2=4563;
input3=7654;
inputs={2345,4563,7654}
output=min+max(9+18)==27
--------------------------------------------------------------------------------------------------------------------------------

Problem-2:
Given two inputs have one input is integer and next inputs has string array to find each string in
array first and last character have oval then return to print that string has add to final output to
convert lower case

input1=3;
input2={"afhaf","ojhksa","akjdha");
output=ojhksaakjdha
problem faced 1:
take the inputs 3 and find the key....
first is 1000 and second is 100 and third is 10
to find genarete a pin
t1=input1%1000;
t2=input2%100;
t3=input3%10;
after that using while loop and find the key
problem faced 2:
it is string
input:ABCDX
output:FGHIZ
Shifts each character in a word forward by the length of the word.
Shifts a single character forward by n positions, wrapping around if necessary

problem-1
Given three inputs input1,input2,input3.
we have to generate smallest number and largest number in input1,input2 and input3 and apply sub
operator
sample input = input1:2345 input2:1897 input3:457
sample output = 5+9+8-2+1+4 =22-7=15

problem-2
Given a string we need to check whether the given string is in correct alphabetical order or not.
if it is in alphabetical order return true else return false

sample input : dkm


sample output:true

Problem-1 :
Input: Input1, Input2, Input3
Formula to be used:
key = (Hundreds place digit) * (tens place digit) - (max digit of input3)
Description: By using the above formula , firstly from the input1 it should return the hundreds place
digit , next from input2 it should return the tens place digit and from input3 it should return the
maximum of the number
Finally substitute the each and every return of three inputs in the given formula
Here we have 3 inputs:
input1: 3267
input2: 9453
input3: 2346
Now we should apply the formula
output: 256

Problem-2 :
Input : Given a string "WIPRO TECHNOLOGY"
Description: Here in the given input we should print the each word in the reverse format but not the
entire string
i.e, here we have a string with two words now it should return in the format of
Output: " ORPIW YGOLONHCET "
problem 1:
3 inputs were given like input 1,input2,input 3 which are limited from 1000 to 9999.
the question is described as we have to print the key ie the largest number of given 3 and the
smallest of the three ie thousands, same as for the hundreds and then tens and ones.
------
problem 2:

2 inputs were given as arrays from which we have to extract the uncommon numbers and make the
sum of it in such a way that single digit number is formed.
----------------------------------------------------------------****-----------------------------------------------------------------

You might also like