what's 'top searching' algrorithm look alike? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

what's 'top searching' algrorithm look alike?

what's 'top searching' algrorithm look alike? I mean when I type 'a' it thens appear 'ant' , 'auction' or other word I 'string'.The point is that word must start with a letter I entered. is it something like string b; string a [3] = {aspirin , ant , auction , ambious}; cin>>b; if (b == a ) cout<<a[0] , << a[1] ,<< a[2] , <<a[3]; ps.my language is c++ and I am still very noob about it , thanks.

14th Aug 2019, 9:49 AM
เด็กชายปุณณวิชญ์ สุทธิพานิช
เด็กชายปุณณวิชญ์ สุทธิพานิช - avatar
2 Answers
+ 3
Please mention your referenced language C++ in Relevant Tags and remove the 'helpmepls' word. Thank you for understanding 👍
14th Aug 2019, 10:39 AM
Ipang
+ 2
string b; string a[4] = {"aspirin ", "ant ", "auction ", "ambious"}; cin>>b; if (b == "a") cout<<a[0]<<a[1]<<a[2]<<a[3];
14th Aug 2019, 10:05 AM
Solo
Solo - avatar