— So, it would then not be iddfs if I changed the order
— I could make it more like dfs by using shift
to dequeue and push
to queue
— While now it's push and pop?
— Although I never use push personally, and I would not use shift either. Instead I leave the array in a sparse state and reassign keys, or keep a cursor location updated
Message permanent page
— Shift is slower I believe
— It is not good to change Array size a lot, so having undefined indexes is better
— Instead I would simply have a cursor increment every traversal, moving down the array as it's value increases
Message permanent page