Sorted Unique Permutation
Sorted Unique Permutation
PERMUTATION
TEST TIME ON MANACHER'S
ALGORITHM
URL:
https://forms.gle/aVqbiUfE2quWLoPQA
QR CODE:
Sorted Unique Permutation
INTRODUCTION
In this programming problem, we are given a string str.
Example
Input Output
Explanation:
Length of Str: 3
Algorithm
Sort the string, if the input isn’t sorted already.
Print the sorted string and then loop for the number of
(permutations-1) times as 1st string is already printed.
Complexity
If B5D means B is the father of D; B9D means B is the sister of D;B4D means B is the
brother of D; B3D means B is the wife of D. Which of the following means F is the mother of
K?
A.F3M5K
B.F5M3K
C.F9M4N3K
D.F10M43
Answer : A
Explanation :
Answer : D
Explanation :
ØA is the brother of B and B is the brother of C. So, C may be the brother or sister of A.
Question: Q05
In a family, there are six members A, B, C, D, E and F. A and B are married couple, A being
the male member. D is the only son of C, who is the brother of A. E is the sister of D. B is the
daughter-in law of F, whose husband has died. How is E related to C ?
A.Sister
B.Daughter
C.Cousin
D.Mother
Answer : B
Explanation :
ØA is a male and married to B. So, A is the husband and B is the wife. C is the brother of A.
D is the son of C. E. who is the sister of D will be the daughter of C. B is the daughter-in-law
of F whose husband has died means F is the mother of A. ØClearly. E is the daughter of C.
Explanation :
Question: Q06
There are six persons A. B, C, D, E and F. C is the sister of F. B is the brother of E's
husband. D is the father of A and grandfather of F. There are two fathers, three brothers and
a mother in the group. Who is the mother ?
A.A
B.B
C.C
D.E
Answer : D
Explanation :
Answer : A
Explanation :
ØSince Harsh has no brother or sister, so he is his father's only son. Now, wife
Of my father's son — my wife.
So, Harsh's wife is the man's mother or the man is Harsh's son
Question: Q03
Answer : D
Explanation :
Question: Q03
Answer : D
Explanation :
Question: Q03
Answer : D
Explanation :
Question: Q03
Answer : D
Explanation :
Question: Q03
Answer : D
Explanation :
Question: Q03
Answer : D
Explanation :
Question: Q03
Answer : D
Explanation :
THANK
YOU