I\'ve got a database with approximately 200 000 items, which is sorted by username. Now when I add an item to end of array and call my quick sort function to sort that array it
Easy , direct method cause binary searching is too mainstream. Just need a few lines:
int where_to_add(int array[], int element) { int i; for (i = length; i >= 0 && array[i-1] > element; i--); return i; }
Let me know if this is the answer you were looking for