hi
I had this problem where I was asked to :
Write a program that compares and records the time taken to sort an array of social security numbers using four sorting algorithms.
The program must generate random social security numbers. Each group must do an extensive testing on several randomly generated arrays so that a meaningful comparative analysis can be made on different sorting methods. Increase the size of the input to get a growth rate for each algorithm.
You are assigned to do elementary sorting methods: Insertion sort, Quick sort, Merge Sort, Heap Sort . Generate random SSNs as 9 characters: "023568708" using rand().
my question is :
the code is for integer data type and we need to change it to character type, BUT when I print the output it have to appear in this form:
12547865
25044745
01247855
01247524
75520455
each number consist of nine digits and must be stored as character data type. I tried to swiching to character type but then each number or character is printed in this form:
4
d
q
5
g
t
r
I am going to post the code in another thread because its long.
any help will be highly appreciated.
thanks
ayman
I had this problem where I was asked to :
Write a program that compares and records the time taken to sort an array of social security numbers using four sorting algorithms.
The program must generate random social security numbers. Each group must do an extensive testing on several randomly generated arrays so that a meaningful comparative analysis can be made on different sorting methods. Increase the size of the input to get a growth rate for each algorithm.
You are assigned to do elementary sorting methods: Insertion sort, Quick sort, Merge Sort, Heap Sort . Generate random SSNs as 9 characters: "023568708" using rand().
my question is :
the code is for integer data type and we need to change it to character type, BUT when I print the output it have to appear in this form:
12547865
25044745
01247855
01247524
75520455
each number consist of nine digits and must be stored as character data type. I tried to swiching to character type but then each number or character is printed in this form:
4
d
q
5
g
t
r
I am going to post the code in another thread because its long.
any help will be highly appreciated.
thanks
ayman
Comment