The Artima Developer Community
Sponsored Link

Java Answers Forum
Linear search

1 reply on 1 page. Most recent reply: Apr 17, 2002 7:28 PM by Singh M.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Ali G.

Posts: 1
Nickname: blackice
Registered: Apr, 2002

Linear search Posted: Apr 17, 2002 6:48 PM
Reply to this message Reply
Advertisement
Can any body help? I am trying to place a linear search algorithm into a program to search for strings eg. names from a array that they are stored in.

Anybody think they can help?

Thanks for your time.


Singh M.

Posts: 154
Nickname: ms
Registered: Mar, 2002

Re: Linear search Posted: Apr 17, 2002 7:28 PM
Reply to this message Reply
ok, you need two things :
1. you need to loop over this array
2. and will looping, get the value stored in the array and compare for equality with the string that you are searching for.

Flat View: This topic has 1 reply on 1 page
Topic: The Singleton Pattern Previous Topic   Next Topic Topic: sound

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use