https://www.codingame.com/training/medium/identifying-data-structure
Send your feedback or ask for help here!
Created by @java_coffee_cup,validated by @field3,@Deltaspace and @Niako.
If you have any issues, feel free to ping them.
https://www.codingame.com/training/medium/identifying-data-structure
Send your feedback or ask for help here!
Created by @java_coffee_cup,validated by @field3,@Deltaspace and @Niako.
If you have any issues, feel free to ping them.
Hi,
In the exemple, the 3st string i2 i1 i3 i1 o3 o2 should not be unsure ? Because it’s ‘stack’ (i2 - o2) and it’s also ‘priority queue’ (i3 - o3).
Or ‘queue’ and ‘stack’ may be an output only if input and output have the same length ?
Thanks,
Cheers,
Benjamin.
Hi,
It can’t be stack because the first output you make returns 3 which only works with priority queue and not with stack, the data structure needs to work for all the output that are made.