home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!portal!dfuller
- From: dfuller@portal.hq.videocart.com (Dave Fuller)
- Subject: Re: Search function algorithms
- Message-ID: <BxuLM0.MF9@portal.hq.videocart.com>
- Organization: VideOcart Inc.
- X-Newsreader: Tin 1.1 PL3
- References: <102274@bu.edu>
- Distribution: comp
- Date: Tue, 17 Nov 1992 06:49:11 GMT
- Lines: 16
-
- corvett@cs.bu.edu (Sungyeup Kim) writes:
- :
- : Hi,
- : Could somebody give me a very nice and easy search algorithm.
- : What I want to do is after I get a string(I don't know the length)
- : I want to check whether it's in the array or not.
- :
- : Thanks in advance !!!
-
- Easy. bsearch() c library function will do it. If your array isn't
- sorted before the call, use qsort(). Both are documented in reference
- books, work easily, and quickly.
-
- Dave Fuller
- dfuller@portal.hq.videocart.com
-
-