Top view (assignment)


can you tell whats wrong in my code?

hello @bommareddyjyothiswaroopreddy
what issue u r facing?

its working fine.but some testcases it failing

i am not understanding why its failing for some testcases

@bommareddyjyothiswaroopreddy
check for this case->
1 6 2 8 7 4 3 11 -1 9 -1 -1 5 -1 -1 -1 -1 10 -1 -1 -1 -1 -1

expected ->
11 8 6 1 2 3

ur output->
11 10 6 1 2 3

1 Like