1. recursion algo, 2. sort stack

Signed-off-by: test <test@gmail.com>