advance basic structure and ideas. implement selection sort.