From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,PLING_QUERY autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,7d1a02b763945274 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.66.72.131 with SMTP id d3mr2155692pav.38.1358654376200; Sat, 19 Jan 2013 19:59:36 -0800 (PST) Path: 6ni6939pbd.1!nntp.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!news.astraweb.com!border2.newsrouter.astraweb.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nrc-news.nrc.ca!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!novia!nx01.iad01.newshosting.com!newshosting.com!news-out.readnews.com!transit3.readnews.com!panix!newsfeed-00.mathworks.com!nntp.TheWorld.com!.POSTED!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Algorithms Homework Help?!?! Date: Wed, 16 Jan 2013 14:47:37 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 X-Trace: pcls6.std.com 1358365657 14298 192.74.137.71 (16 Jan 2013 19:47:37 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Wed, 16 Jan 2013 19:47:37 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:GiOK4bIyRB9vP/kZZi5pS0YutL0= X-Received-Bytes: 1740 Content-Type: text/plain; charset=us-ascii Date: 2013-01-16T14:47:37-05:00 List-Id: willmann817 writes: > Then do my binary search based on this helper function(Posted below). > --This problem MUST include Binary Search in some way. That seems like an odd requirement. Taken literally, it would mean you could do a binary search on some unrelated data structure, throw away the result, and then solve the real problem some other (slower) way. But that's probably not what your teacher meant. ;-) If I were the teacher, I'd say: The program must run in O(log N) time, where N is .... Note: binary search is an O(log N) algorithm. - Bob