Analysis of bubblesort and binary search