String str[]={"-123","89","-10","456"};
stris an array of strings, with each string in the format of an integer, and you have to perform sorting on this array inO(n log n)time.The strings in
strcan represent both positive and negative integers. The maximum length of these strings is 1024 characters.
I know one solution of this problem is to convert the strings into numbers, then compare them apart from this; is there any other solution to this problem?