When i see that problem i think i could use divide and conquer to solve algorithm chart
second her's my code program code sorry i can't write it here cause i wrote it in inline compiler and the file didn't saved
the code work well but when i calculate the n comparison it was bigger than n + log(n) -2
my question(problem) is i can't solve the problem based on specific run time or specific comparison i solve the problem then calculate the comparison
i speak in general not just for that problem
how can i design(think about) an algorithm based on run time, is there steps to follow or what