smartbobby2K
BAN USER
- 0of 0 votes
AnswersDesign a data structure which reads below block of text
- smartbobby2K in United States
*Status update1
**Joe is working on a bug
**Alice is on vacation
*StatusUpdate2
**Alex finished task1
and returns me an Object such that I can navigate the this nested text easily like this:
obj.children[0] - > returns "StatusUpdate"
obj.children[0].children[1] -> "Alice is on vacation"| Report Duplicate | Flag | PURGE
Microsoft Software Developer - 0of 0 votes
AnswersGiven a Tree where each node contains an attribute say color(R,G,B... etc). find subtree with maximum number of attributes.
- smartbobby2K in United States
Input:
G
/ \
B R
/ \ / \
B B R R
/ \ / \
B R R R
Output:
Input:
R
/ \
R R
\ / \
R R R| Report Duplicate | Flag | PURGE
Microsoft Software Developer Trees and Graphs
Repjatinrawal777, Backend Developer at Absolute Softech Ltd
My name is Jatin Rawal from Mumbai in India. I conceived in India Mumbai 14 December 1987. I am a ...
Hi hprem991, thanks a lot for providing the solution. I have one question, . How currentMax is being updated to point to the root of node that occurs most number of times, in this case 'R'. Could you explain or provide implementation if possible? Thanks a lot.
- smartbobby2K February 20, 2018