Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


what is the best algorithm to sort out unique words from a
list of more than 10 million words(1 crore+)?

we need the best technique in the terms of execution time.

Answers were Sorted based on User's Feedback



what is the best algorithm to sort out unique words from a list of more than 10 million words(1 cro..

Answer / arpit dhandhania

Quick Sort

Is This Answer Correct ?    34 Yes 8 No

what is the best algorithm to sort out unique words from a list of more than 10 million words(1 cro..

Answer / thananjayan

Quick sort is better but we group the words and then used

Is This Answer Correct ?    18 Yes 0 No

what is the best algorithm to sort out unique words from a list of more than 10 million words(1 cro..

Answer / dinavardhini.e

Quick sort.

Is This Answer Correct ?    21 Yes 4 No

what is the best algorithm to sort out unique words from a list of more than 10 million words(1 cro..

Answer / purushottam

Quick Sort

Is This Answer Correct ?    12 Yes 1 No

what is the best algorithm to sort out unique words from a list of more than 10 million words(1 cro..

Answer / rob

They're looking for unique words, so just sorting isn't good enough. Quicksort can still have a worst case runtime of n^2, or 10 million squared operations. We should use mergesort to guarantee O(nlogn) runtime, and then have a for loop to go through the list comparing element[i] with element [i+1], omitting element[i] if it is equal to element [i+1], and otherwise storing it in a new array or printing it to the screen, an O(n) operation. Then the final runtime is O(nlogn + n), ignoring the constant time to insert elements into a new array.

Is This Answer Correct ?    3 Yes 1 No

what is the best algorithm to sort out unique words from a list of more than 10 million words(1 cro..

Answer / swati

Merge sort or Heap sort ..b'coz these sorting has optimal
running time i.e O(nlogn)..

Is This Answer Correct ?    3 Yes 1 No

what is the best algorithm to sort out unique words from a list of more than 10 million words(1 cro..

Answer / karthickkumar

tree

Is This Answer Correct ?    2 Yes 3 No

what is the best algorithm to sort out unique words from a list of more than 10 million words(1 cro..

Answer / sivapriya

sorting is best

Is This Answer Correct ?    2 Yes 4 No

what is the best algorithm to sort out unique words from a list of more than 10 million words(1 cro..

Answer / shabeer

Array is best

Is This Answer Correct ?    4 Yes 17 No

Post New Answer

More C++ Code Interview Questions

write a program to perform generic sort in arrays?

0 Answers  


what is the difference between int &r and int& r

3 Answers  


Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.

0 Answers  


A Binary no. is given, we hav to find it's decimal equivalent.

2 Answers   Microsoft,


what is virtual constroctor ? give an exam for it?-(parimal dhimmar)

2 Answers  


output for printf("printf");

0 Answers  


write a function – oriented program that calculates the sum of the squares from 1 to n. thus, if the input is 3, the output is 14

3 Answers  


Code for Small C++ Class to Transform Any Static Control into a Hyperlink Control?

0 Answers   Wipro,


U hv to enter a range from a and b and search hw many no. of times a pattern n. occurs between the range a and b. Eg :i/p:enter range :0 100 Enter pattern: 13 o/p: the no. times 13 occurred betwwn 0 to 100:1 Eg :i/p:enter range :100 1000 Enter pattern: 13 o/p: the no. times 13 occurred betwwn 100 to 1000: (in this 13,113,131,132,133&#8230;139,213,313,&#8230;913 all these will be counted)

0 Answers  


Write a program that takes a 3 digit number n and finds out whether the number 2^n + 1 is prime, or if it is not prime find out its factors.

3 Answers   TCS, Vimukti Technologies, Wipro,


Code for Easily Using Hash Table?

0 Answers  


what mean void creat_object?in public class in this code class A{ public: int x; A(){ cout << endl<< "Constructor A";} ~A(){ cout << endl<< "Destructor A, x is\t"<< x;} }; void create_object(); void main() { A a; a.x=10; { A c; c.x=20; } create_object(); } void create_object() { A b; b.x=30; }

0 Answers  


Categories