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:

  1. sort array
  2. 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

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -