INFOTECH Coding Question – Solved

11 Live
Question: The kingdom has been given terrible news: the King has passed away. While the nation is mourning, the noblemen need to decide who will take the throne next. The late King had many children, and now it is necessary to determine their order of succession according to their seniority. The list of the King's children is represented as a table "Successors" with the following attributes: - name: the child's name - birthday: the date of their birthday (it is guaranteed that birthday dates are unique) - gender: their gender (a character equal to 'M' or 'F') The resulting table should contain the names of the King's heirs in order of their succession to the throne as determined by their age, and preceded by their potential future titles (i.e. "King name" or "Queen name"). Example: For the following table "Successors": | name | gender | birthday | |--------|--------|------------| | Amelia | F | 1711-06-10 |

Asked in: INFOTECH

Image of the Question

Question Image

All Testcases Passed βœ”



Passcode Image

Solution


Please login to view the solution


Related Questions

| You are given a board of size M Γ— N where each cell can be either empty ('O') o… |
| Undirected Coloured Graph Shortest Path You are given an undirected weight… |
| Village Voyage A computer game "Village Voyage" has N villages (labeled 1 to… |
| Academic Decathlon Students are being selected for an academic decathlon tea… |
| Sum of Arrays Given two arrays each of length n, arr1 and arr2, in one opera… |
| Count Swaps During Custom Sorting Analyze the efficiency of the following so… |