Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Logical Error

Hello Everyone,

I am facing an issue while creating a logic. Require your help

Data:

A
1
2
2
2
2
3
3
3
3
4
2
2
3
3
4

4

Output:

 

  

AOutput
11
22_1
22_2
22_3
22_4
33_2_4_1
33_2_4_2
33_2_4_3
33_2_4_4
44_3_2_4_4_1
22_5
22_6
33_2_6_1
33_2_6_2
44_3_2_6_2_1
44_3_2_6_2_2

The logic behind the output is very easy.

Thanking you all in anticipation

Regards

KP

14 Replies
Anonymous
Not applicable
Author

Hey antoniotiman thanks for your instant reply, but as I told vineet the problem here is its a static code. What if 5,6,7 are added to the tree then this will work only for 1,2,3 and 4

vinieme12
Champion III
Champion III

won't be a problem, try and let me know

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
antoniotiman
Master III
Master III

I added 5,5,6,6,7 (same script)

Anonymous
Not applicable
Author

its working thanks

Anonymous
Not applicable
Author

its working buddy..!! thanks a ton