• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

Sybex - OCP JSE 11 - 1Z0-819 - Chapter 5 - Answer 19

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Jeanne, Scott, Staff team,

Answer 19 should be A. and B.

binarySearch() will always yield the middle element index if it is a match regardless of whether the array is sorted or not.

I understand the intent is to explain the unpredictability of binarySearch() in case the array is unsorted.

I would suggest changing: B. to B. 0 and F. to F. one output is unpredictable

The term undefined might imply the wrong interpretation.

Thanks for a great book,

Bassam
 
A magnificient life is loaded with tough challenges. En garde tiny ad:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic