Array Algorithms -
i have 1 question ask on algorithms. have been asked write algorithm on this: not asking write algo me, let me know efficient process need do:
there array of n elements book or contents of bible, , suppose have inserted input string "gaurav agarwal" in that. want need fetch unique elements present in array string. algorithm how proceed further (unsorted)
if did not understand let me know , try on this.
one way find duplicates in unsorted array sort based on string elements, therefore algorithm homework question be:
- sort array
- check array existence of "gaurav agarwal". since sorted, neighboring elements same string, , need keep counter , increment until find first array element not equal string you're looking for
Comments
Post a Comment