19th Aug | Non-PRP | Wipro Practice Qns
Quantitative Aptitude:
1.Reena has 246 plants to plant. What maximum number of rows can she plant so that each row contains equal number of plants and there is no extra plant left?
8
6
3
2
2.Product of two numbers is 9,152 and their HCF is 8.what is the LCM of the numbers?
2,344
73,216
1,144
9,152
3.Express the fraction 26/17 as a number up to 3 decimal points.
1.529
1.321
1.535
1.429
4.The number of ways in the letters of the word “RESULT” can be arranged without repetition is
840
60
720
120
5.Four bells begin to toll together and then each one at intervals of 6,7,8, and 9 seconds respectively. The number of times they will toll together in the next 2 hours is:
11
13
15
14
6.Akhil monthly income is 20% more than that of Ranvir's, Ranvir's monthly income is 10% less than that of
Deepak.If the difference between the monthly incomes of Akhil & Deepak is 1600. What is the monthly
income of Ranvir?
13,000
15,000
18,000
24,000
7.A's income is 25% more than B's income. B's income in terms of A's income is
90
85
80
83
8.If X =(1+2)1/2 and y=(1-2)1/2 ,then X2 + Y2 is:
0
6
3
2
9.Three employees and four intems can complete a task in 8 days . While four employees and three in
terms can do the same work in 8 1/3 days . In how many days can two employees and one intem do the
work?
20 days
3 1/6 days
3 2/3 days
17 1/3 days
10.The product of two numbers is 2028 and their H.C.F. is 13. the number of such pairs is:
4
3
2
1
11.What is X if 8-1 *X=(-4)-1 ?
-1
-2
1
2
12.Select the right option from the given alternatives. 985 : 874 :: 763 : ?
652
722
542
641
13.The total combinations of picking 3 balloons from a packet of 25 balloons are:
2400
2300
2200
2100
14.For the post of 2 receptionists, there are 12 equally qualied candidates. In how many ways can they be selected ?
24
12
66
136
15.A cow and a horse are bought for Rs. 2,50,000. The cow is sold at a prot of 15% and the horse is sold at
a loss of 15%. The overall gain is Rs. 22,500. The cost price of the cow is
1,30,000
1,20,000
2,00,000
50,000
16.In a non-leap year, what is the probability that the last day of the year starts with a ‘T’?
2/7
0
1
4/7
17.Length and breadth of a rectangle are directly proportional. If length increases from 6 cm to 21 cm and if breadth now is 14 cm, then what was the breadth before any change in length occurred?
2 cm
3 cm
1.5 cm
4 cm
18.What is the probability of getting an even sum of score in a throw of 2 dice ?
1/2
1/4
17/36
1/3
LOGICAL REASONING:
1.Choose the right answer Choose the odd man out.
CIRCLE
PENTAGON
SQUARE
TRAINGLE
2.Answer the question based on the given information. Passage: X, Y, Z, P and R are sitting in a row in front
of a camera. X is on the left of the person sitting in the centre, but is on theright of Y. Z is on the right of
P and R is on the right of Z. R is the second person from the person sitting in the centre. Which pairs is X
sitting between ?
Y and Z
Y and P
P and R
P and Z
3.Introducing a man, a woman said, “He is the husband of my mother’s daughter”. How is the woman
related to the man?
None of these
Sister
Daughter
Mother
4.Find the next number in the series 2,4,12,48, …….
340
960
240
480
5.There are 2 questions based on the same data. Answer the question based on the given information: A
marketing company requires a qualied engineer with a management degree. The candidate must: 1).Be
a graduate with at least 55% marks 2).Hold in an MBA degree with a minimum of 50% marks. 3).Have
secured at least 55% marks in Sr. secondary examination . This condition will be relaxed up to 5% if the
candidate has two years experience of working with a reputed company. 4).Should have at least one
year’s experience as an engineer. 5).If he/she fullls all other conditions except (4) but has an additional
diploma in computers or I.T. his/her case is to be referred to the general manager. 6).If he/she fullls all
other conditions but has marketing degree instead of the condition given at (3) his/her case is to be
referred to the managing Director 7).Not be of age greater than 30 years. Can the given candidate be
selected? Hari Rai is a 27 years old B.Tech . Graduate from I.P University. He has also done MBA from IIM
Indore. He secured 65% marks in his nsr. Secondary examination . He has been working with a reputed
engineering company, Chennai for the last 3 years
The candidate is to be referred to the managing Director
the candidate is to be referred to the general manager
Insufficient data
6.The question consists of a problem question followed by two statements 1 and 2. Find out if the
information given in the statements is sufcient in nding the solution to the problem. Problem question:
Out of ve parties, which party won the election? Statements: 1).Party ‘X’ got the least number of votes.
2).Party ‘Y’ got hundred more votes than party ‘Z’.
Either of the statements is sufficient
Both the statements even put together are not sufficient
Both statements put together are sufficient
Statement (2) alone is sufficient
Statement (1) alone is sufficient
7.The question consists of a problem question followed by two statements 1 and 2. Find out if the
information given in the statements is sufcient in finding the solution to the problem. Problem question:
Vikas ranks 9th in the class. How many students are there in the class?
Statements:
1).His friend got the 35th rank which is the last rank.
2).His rank from the last is 27th.
Either of the statements is sufficient
Both the statements even put together are not sufficient
Both statements put together are sufficient
Statement (2) alone is sufficient
8.From the given anagrams select the odd one out
LUFTE
PULIT
ESOR
STUOL
9.I was facing west. I turned 1250 in the clockwise direction and 100 in the anticlockwise direction. Which direction am I facing now?
North-East
North
East
North-West
10.Answer the question based on the given information. Passage: X, Y, Z, P and R are sitting in a row in front
of a camera. X is on the left of the person sitting in the centre, but is on the right of Y. Z is on the right of
P and R is on the right of z. R is the second person from the person sitting in the centre. Who is between
X and Z?
None of the above
Data in adequate
R
Y
11.Select the word or phrase which best expresses the meaning of the given word. CITESelect one
signal
visualize
locate
quote
galvanize
12.Choose the answer option that arranges the given set of words in the ‘most’ meaningful order. The
words when put in order should make logical sense according to size, quality, quantity, occurrence of
events , values, appearance, nature, process etc.
QUESTION:
1. Earn
2. Shopping
3. Boy
4. Money
5. Job
2,3,5,1,4
3,5,1,4,2
3,4,5,1,2
13.Sagar walks 30 meters west and takes a left turn to walk 10 meters, then takes left turn again and walks
40 meters, and takes another left turn and walks 20 meters. In which direction is he standing now from
the starting point?
North
North-West
South-East
North-East
14.Given signs signify something and on that basis, assume the given statements to be true and nd which
of the two conclusions I and ll is/are denitely true. A+B means A is greater than B A-B means A is equal
to B A=B means A is not equal to B AB means A is greater than equal to B A/B means A is not less than
equal to B QUESTION: Statements: A/BC=D Conclusions I.B-D II.B=D
Neither conclusion I nor II is true
Either conclusion I or II is true
Only conclusion II is true
Only conclusion I is true
15.Decode the words/pattern given in the question If STUMP is coded as PQRJM, then PITCH is coded as:
RKVEK
MEQAE
QJUDI
MFQZE
VERBAL ABILITY:
1.Select the word or phrase which best expresses the meaning of the word typed in bold. Only those who
are gullible take every advertisement seriously. Select one:
gullible
unrealistic
fallible
enthusiastic
unsuspecting
2.Select the word or phrase which best expresses the meaning of the word typed in bold. A person
unrestrained by the rules of morality or tradition is called a licentious person. Select one:
licentious
loafer-type
criminal
freelance
libertine
3.Based on the given passage nd out which of the following statements can be inferred from the passage
According to a recent study, in the local municipal elections, the candidates who interacts more with
the Resident’s welfare Associations and wins their trust will get maximum name recognition in the
elections
For maximum name recognition, a candidate need not spend a lot of money on posters, banners
and advertising compaign
Resident’s Welfare associations exert a lot of influence over the voting population residing in the
city
Maximum name recognition will help a candidate win a higher percentage of votes cast during the
election
Local Resident’s Welfare Associations are the most important factor in the elections in the city
4.They were going home when it was starting to rain
No change
When it is starting to rain
When it was raining
When it started to rain
5.In the question, a part of the sentence is italicized. Alternatives to the italicized part are given which
may improve the construction of the sentence
. Select the correct alternative
Get out of the building it sound like the generator is going to explode.
It sounds like generator exploded
It sounds like generator exploded
It sounds like the generator is going to explode
It is sounding like the generator is going to explode
6.Select the word or phrase which is opposite to the given word GRISLY
suggestive
untidy
bearish
doubtful
pleasant
7.Our bright and beautiful environment is being systematically destroyed under the pressure of a ____
population
Enlarging
Widening
Expanding
Proliferating
8.Select the word or phrase which best expresses the meaning of the given word. CONCEITED
misconception
Deceive
FALSE
Arrogant
9.Select the word or phrase which best expresses the meaning of the word typed in bold. He has a
propensity for getting into debt.Select one:
propensity
characteristic
quality
aptitude
natural tendency
10.Select the word or phrase which best expresses the meaning of the word typed in bold. The
environment left a deleterious effect on his health.Select one:
deleterious
Harmful
Fatiguing
Aesthetic
Health
Weakening
11.Select the word or phrase which best expresses the meaning of the given word CELLAR
roof
Basement
Attic
Loft
12.In the question, a part of the sentence is italicized. Alternatives to the italicized part are given which
may improve the construction of the sentence . Select the correct alternative People working in high
positions in companies tend to shifting their work burden by delegating tasks to their subordinates.
No improvement needed
Tend as to shifting their work
Tend to shift their work
Tend for shifting their work
13.Select the word or phrase which best expresses the meaning of the given word. TIMID
Shy
Medium
Slow
Fast
14.Select the word or phrase which best expresses the meaning of the given word VOGUE
prevalent
Unfashionable
Nonconforming
Deviation
15.Select the option that is most nearly OPPOSITE in meaning to the given word IGNOBLESelect one:
veracious
known
given to Qtioning
worthy
produced by fire
16.Select the word or phrase which best expresses the meaning of the given word. HINDER
push
Accomplish
Motivate
Hold back
17.Select the option that is most nearly opposite to the given word ENFORCE ( OPPOSITE)
exert
Abandon
Accomplish
Administer
18.Select the word or phrase which best expresses the meaning of the given word. SUFFOCATE (OPPOSITE)
Stie
Release
Restrain
Curb
19.Select the correct option that fills the blank to make the sentence meaningfully complete The leaves
___yellow and dry
was
Being
Had
Were
20.Nothing ____ convinced her to cancel her trip to Goa
Will have
Could
Could have
Was going to
21.Select the option that is most nearly opposite to the given word LITERAL
figurative
Unblessed
Ordinary
Usual
Factual
22.Select the option that is most nearly opposite to the given word PREMEDITATED ( OPPOSITE)
natural
Spontaneous
Artless
Ingenuous
CODING QUESTIONS:
1)
Problem statement
You are given a grid of size NX N that has the following specifications: • Each cell in the grid contains
either a policeman or a thief. • A policeman can only catch a thief if both of them are in the same row. •
Each policeman can only catch one thief. • A policeman cannot catch a thief who is more than K units
away from the policeman. Write a program to find the maximum number of thieves that can be caught
in the grid.
Input Format
First line: T (number of test cases)
For each test case
First line: Two space-separated integers N and K
• Next N lines: N space-separated characters (denoting each cell in the grid)
Constraints
1<T < 10
1<N< 1000
1<=K <=N * N
Output Format
For each test case, print the maximum number of thieves that can be caught in the grid
C++ SOLUTION:
#include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define MAX 5123
#define NIL 0
#define INF (1<<28)
using namespace std;
char a[51][51];
int police[51][51];
int thief[51][51];
vector< int > G[MAX];
int n, m, match[MAX], dist[MAX];
// n: number of nodes on left side, nodes are numbered 1 to n
// m: number of nodes on right side, nodes are numbered n+1 to n+m
// G = NIL[0] ∪ G1[G[1---n]] ∪ G2[G[n+1---n+m]]
bool bfs() {
int i, u, v, len;
queue< int > Q;
for(i=1; i<=n; i++) {
if(match[i]==NIL) {
dist[i] = 0;
Q.push(i);
}
else dist[i] = INF;
}
dist[NIL] = INF;
while(!Q.empty()) {
u = Q.front(); Q.pop();
if(u!=NIL) {
len = G[u].size();
for(i=0; i<len; i++) {
v = G[u][i];
if(dist[match[v]]==INF) {
dist[match[v]] = dist[u] + 1;
Q.push(match[v]);
}
}
}
}
return (dist[NIL]!=INF);
}
bool dfs(int u) {
int i, v, len;
if(u!=NIL) {
len = G[u].size();
for(i=0; i<len; i++) {
v = G[u][i];
if(dist[match[v]]==dist[u]+1) {
if(dfs(match[v])) {
match[v] = u;
match[u] = v;
return true;
}
}
}
dist[u] = INF;
return false;
}
return true;
}
int hopcroft_karp() {
int matching = 0, i;
while(bfs())
for(i=1; i<=n; i++)
if(match[i]==NIL && dfs(i))
matching++;
return matching;
}
void solve() {
for(int i=0;i<MAX;i++) G[i].clear();
memset(match,0,sizeof(match));
memset(dist,0,sizeof(dist));
int N, K;
cin>>N>>K;
assert(N>=1 && N<=50);
assert(K>=1 && K<=N);
int cnt_p = 0, cnt_t = 0;
for(int i=0;i<N;i++) {
for(int j=0;j<N;j++) {
cin>>a[i][j];
assert(a[i][j]=='P' || a[i][j]=='T');
}
}
for(int i=0;i<N;i++)
for(int j=0;j<N;j++)
if(a[i][j] == 'P') {
cnt_p++;
police[i][j] = cnt_p;
}
else {
cnt_t++;
thief[i][j] = cnt_t;
}
n = cnt_p, m = cnt_t;
int pol,thf;
for(int i=0;i<N;i++) {
for(int j=0;j<N;j++) {
if(a[i][j]=='P') {
pol=police[i][j];
for(int k=0;k<N;k++) {
if(abs(k-j) <= K && a[i][k] == 'T' && k!=j) {
thf=thief[i][k];
G[pol].pb(cnt_p + thf);
}
}
}
}
}
int ans = hopcroft_karp();
cout << ans << "\n";
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int t;cin>>t;
assert(t>=1 && t<=10);
while(t--) solve();
}
2)
Problem Statement
Given an array arr[] of N non-negative integers representing the height of blocks. If width of each block
is 1, compute how much water can be trapped between the blocks during the rainy season.
Input Format
First line of input contains n-the size of array. Next line of input contains n integers-the elements of the
array.
Constraints
3<=n<=10^5
0 <= Ai <= 10^8
Output Format
Print the total amount of water that can be trapped.
For example, in first sample test case:- Bars of input are {3,0,0,2,0,4}. So, Water trapped between 0th
bar and 1st bar=3 Water trapped between 1st bar and 2nd bar=3 Water trapped between 2nd bar and
3rd bar=1 Water trapped between 3rd bar and 4th bar=3 Total Water trapped=10.
Sample Input
6
3 0 0 2 0 4
Sample Output
10
PYTHON Solution:
for _ in range(int(input())):
n=int(input())
a=list(map(int,input().split()))
b=[]
lmax=a[0]
rmax=max(a[1:])
count=0
for i in range(n):
if(a[i]>lmax):
lmax=a[i]
if(a[i]==rmax and i<n-1):
rmax=max(a[i+1:])
h=min(lmax,rmax)
count+=max(h-a[i],0)
print(count)
Post a Comment