Question
How many persons sit in the
row? Answer the questions based on the information given below: Certain number of persons sits in a straight row facing north. E doesn’t sit adjacent to O. Five persons sit between L and W. Z sits exactly between L and W. Five persons sit between Z and E. O sits fourth to the right of L. W sits second from one of the extreme ends. Two persons sit between E and T. Number of persons to the right of T is two more than those to the left of L. S sits third to the right of J, who sits exactly in the middle of the row.Solution
Five persons sit between L and W. Z sits exactly between L and W. Five persons sit between Z and E. O sits fourth to the right of L. W sits second from one of the extreme ends. E doesn’t sit adjacent to O. There will be two cases: If W sits second for the left end, then L will sit sixth to the right of W. Z will sit either third to the right of W or third to the left of L. E will sit sixth to the right of Z. This case will get discarded as E doesn’t sit adjacent to O. _____ W ____  _____ Z _____ _____ L _____ ______ E O                                    Case 1. If W sits second for the right end, then L will sit sixth to the left of W. Z will sit either left to the right of W or third to the right of L. E will sit sixth to the left of Z. E ______  ______ L _____  _____ Z O _____ W _____                                     Case 2.  Two persons sit between E and T. Number of persons to the right of T is two more than those to the left of L. S sits third to the right of J, who sits exactly in the middle of the row. T sits third to the left of E. We know that 13 persons are sitting to the right of T. So, number of person sitting to the left of L = 13 – 2 = 11. Now, total number of persons in a row is 19 and J sits exactly in the middle of the row. Sp, J will either tenth to the right or left end of the row. ______  ______  ______  ______  ______ T ______  ______ E J  ______ L S  _____ Z O _____ W _____                                     Case 2. Final arrangement a shown below: _____  ____   _____  ______   _____  T ____   _____ E J ____ L S _____ Z O ____ W ____
Which function is used to deallocate dynamic memory in C++?
What is the worst-case time complexity of inserting n elements into an empty linked list, if the linked list needs to be maintained in sorted order? Mo...
The communication structure that we need in socket programming is called as _________.
In dynamic programming, what is memoization?
In virtual circuit network each packet holds ___________
Deleting top element of stack?
What is the primary role of semantic actions in syntax-directed translation?
Which recovery model in a database allows for point-in-time recovery using transaction logs?
What does a diamond shape represent in an ER diagram?
What is the decimal equivalent of the binary number 10101?