0

I have around 1 million record. Which is similar to array of something like

String[] a1 =  {"A,B,C","C,D,E",...so on};
String[] a2 =  {"F,G,H","I,J,K",...so on};
.
.
.
String[] ax =  {"X1,X2,X3","X4,X5,X6",...so on}; //x is near to one million.

What is best way to find if string array contains particular word i.e A or B?

Rajeev Singh
  • 3,292
  • 2
  • 19
  • 30
Pratiyush Kumar Singh
  • 1,977
  • 3
  • 19
  • 39
  • 1
    Define "best". Do you mean simplest, fastest, or something else? What have you tried to implement this quite basic functionality. What is wrong with what you tried? How is the fact that you have many arrays relevant? – JB Nizet Apr 18 '16 at 19:03
  • 1
    Also, what do you mean by word: Is `X1,` a word? Or is a word delimited by `,`? – totoro Apr 18 '16 at 19:08
  • 1
    Yes, X1 is word, and Currently, I am taking each string array and splitting and crating multiple string arrays and searching required string within those arrays. – Pratiyush Kumar Singh Apr 18 '16 at 19:10

0 Answers0