KLA interview question

write code for bubble sort and merge sort