Added bubble sort and selection sort logic