In my last exam, i had an assignment, one of five, which refers to dynamic lists. I had a single dynamic list, and I was asked to write a function which will add a element in the list. The thing is that list is sorted, and i have to add that element on the exact place, so that list remains sorted.
I looked on forum for sorting a dynamic list and found lots of posts which are about sorting dynamic lists. I want to know is it possible to do this assignment without need for sorting? If it isn't, I assume it isn't, do I need to use binary trees?