Algorithm work on stack, queue, sorting